/// <summary> /// Starts a new game. This loads a new level and also adds an appropriate BaseGameMode component /// and initializes it. /// </summary> public void StartGame(GameController.Difficulty difficulty, GameModeType gameMode, int initialPlayerCount) { m_difficulty = difficulty; var config = m_gameModesConfig.First(entry => entry.gameModeType == gameMode); SceneManager.LoadScene(config.gameModeScene); // Create and assign as current game mode and only a frame later, after level is loaded // (SceneManager.LoadScene starts loading a frame later), enable and initialize GameMode SetCurrentGameMode(config.gameMode); m_gameMode.gameObject.SetActive(false); StartCoroutine(DelayedGameModeActivation(config.gameMode, initialPlayerCount)); }
public static Dictionary <stars, int> getScoreTresholdsFor(GameController.Difficulty difficulty) { return(scoreTresholds[difficulty]); }