Example #1
0
 public void ChangeState(GameState gameState)
 {
     if (gameStates.Count == 0)
     {
         gameStates.Add(gameState);
     }
     else
     {
         gameStates[gameStates.Count - 1].Unload();
         gameStates[gameStates.Count - 1] = null;
         gameStates[gameStates.Count - 1] = gameState;
         gameState.Init();
     }
 }
Example #2
0
 public void PushState(GameState gameState)
 {
     gameStates.Add(gameState);
     gameState.Init();
 }