protected override void OnStateEntered() { OnBattleStateEntered.Invoke(); // cleanup in-case PlayerSpawner.CleanupAllPlayers(); CleanupCurrentGameMode(); InGameConstants.BattlePlayerPartsFade = false; reflectActionAccumulator_.BeginAccumulating(); // TODO (darren): filtering based on options will be here if (QueuedGameMode != null) { currentGameMode_ = QueuedGameMode; QueuedGameMode = null; } else { var unlockedModes = GameModesProgression.FilterByUnlocked(GameConstants.Instance.GameModes); currentGameMode_ = GameModesPlayedTracker.FilterByLeastPlayed(unlockedModes).ToArray().Random(); } currentGameMode_.LoadArena(() => { currentGameMode_.ShowInstructionsIfNecessary(() => { currentGameMode_.Activate(FinishBattle); GameModeIntroView.OnIntroFinished += HandleIntroFinished; InGamePlayerHUDEffect.CreateForAllPlayers(); }); }); onSkipBattle_ = FinishBattle; }
public void ActivateGameMode() { DestroyAllCars(); gameMode.Activate(); }