/// <summary> /// Starts the round, allowing the player to build etc. /// </summary> public void BeginRound() { ProjectileController.Singleton.ClearProjectiles(); VehicleController.Singleton.ClearVehicles(); RoundCleanController.Singleton.ResetRound(); ChallengesController.ResetChallengeValues(); ReadyActionControllers(); RoundSurpriseController.Singleton.ResetRoundSurprise(); StartCoroutine("BuildCycle"); }
private IEnumerator ActionPhase() { UIPhaseController.Singleton.NextPhase(); // Set the current UI phase to fortress. yield return(StartCoroutine(FortressPhase())); ChallengesController.CheckFortressChallenges(); UIPhaseController.Singleton.NextPhase(); // Set the current UI phase to tunnel. yield return(StartCoroutine(TunnelPhase())); ChallengesController.CheckTunnelChallenges(); EndRound(); }
/// <summary> /// Creates a new round from a random round template. /// </summary> public void CreateNewRound() { BorderController.HideBorder(); RoundCleanController.Singleton.CleanRound(); StopCoroutine("BuildCycle"); StopCoroutine("ActionPhase"); roundHasEnded = false; currentRound = new Round(ChooseRoundTemplate()); ChallengesController.ResetChallengeValues(); UIChallengesController.Singleton.InitializeUIChallenges(currentRound.RoundChallenges); }
private void EndBuildPhase() { UIStackHeightController.Singleton.ActivateUIHeightMeter(false); ChallengesController.CheckSkyscraperChallenges(); // Check if the player even has placed blocks: // Otherwise, end the round prematurely. if (BuildController.NumberOfPlacedBuildingBlockCopies > 0) { StartCoroutine("ActionPhase"); } else { EndRound(); } }