/// <summary> /// Sets up the game to be played in the map specified /// </summary> /// <param name="mode">Mode.</param> /// <param name="map">Map.</param> public void playGame(GameModeType mode, MapType map){ Debug.Log ("about to load scene"); switch(map){ case MapType.Prototype: SceneManager.LoadScene ("PrototypeMap", LoadSceneMode.Single); break; } Debug.Log ("Scene loaded"); GameObject container = new GameObject ("_SCRIPTS_"); Object.DontDestroyOnLoad (container); switch(mode){ case GameModeType.ProtectTheQueen: currentModeBeingPlayed = container.AddComponent<ProtectTheQueen.ProtectTheQueenModeBehavior> (); break; } }
/// <summary> /// Sets the game mode for the manager to notify /// </summary> /// <param name="gameMode">Game mode.</param> public void setGameMode(GameMode gameMode){ clearCharactersInScene (); this.currentModeBeingPlayed = gameMode; }