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; }
/// <summary> /// Устанавливаем состояние игры /// </summary> /// <param name="newState"></param> public void SetGameState(BaseGameState newState) { _currentState = newState; _currentState.Initialize(); }