Exemplo n.º 1
0
 public GameStateManager(SnakeGame game, GameContentManager gameContentManager)
 {
     MenuState = new MenuState(this, game, gameContentManager);
     PlayingGameState = new PlayingGameState(this, game, gameContentManager);
     EndGameState = new EndGameState(this, game, gameContentManager);
     _currentState = MenuState;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Устанавливаем состояние игры
 /// </summary>
 /// <param name="newState"></param>
 public void SetGameState(BaseGameState newState)
 {
     _currentState = newState;
     _currentState.Initialize();
 }