//------------------------------------------------------------------------------ // Function: AddGameState // Author: Neil Holmes & Andrew Green // Summary: adds a new game state to the game state manager //----------------------------------------------------------------------------- public void AddGameState(GameState gameState) { // tell the game state to load it's content gameState.LoadContent(); // add the game state to the manager gameStates.Add(gameState); }
//------------------------------------------------------------------------------ // Function: RemoveGameState // Author: Neil Holmes & Andrew Green // Summary: immediately removes a game state. the state will not transition off //----------------------------------------------------------------------------- public void RemoveGameState(GameState gameState) { // tell the game state to unload it's content gameState.UnloadContent(); // remove the game state from the manager gameStates.Remove(gameState); // remove the gane state from the current update list gameStatesToUpdate.Remove(gameState); }