Beispiel #1
0
        /// <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");
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
        /// <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);
        }
Beispiel #4
0
        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();
            }
        }