Example #1
0
        protected override void OnStateExited()
        {
            // cleanup battle here
            BattlePlayerTeams.ClearTeams();
            BattleRecyclables.Clear();
            PlayerSpawner.CleanupAllPlayers();
            AISpawner.CleanupAllPlayers();

            InGameConstants.AllowChargingLasers = true;
            InGameConstants.EnableQuacking      = false;

            celebrateActionAccumulator_.EndAccumulating();

            Hint.Hide();
        }
        protected override void OnStateExited()
        {
            BattleRecyclables.Clear();
            PlayerSpawner.CleanupAllPlayers();
            InGameConstants.BattlePlayerPartsFade = false;

            PlayerSpawner.ShouldRespawn = false;
            LobbyArenaLoaded            = false;

            PlayerCustomizationView.Hide();
            RegisteredPlayers.FinishPlayerRegistration();
            StatsManager.ClearAllStats();

            if (delayedBackToMainMenuView_ != null)
            {
                delayedBackToMainMenuView_.AnimateOutAndRecycle();
                delayedBackToMainMenuView_ = null;
            }
        }