public void Switch(IGameState gameState) { gameStates.Pop().OnLeft(); gameStates.Push(gameState); gameState.OnEntered(); }
public void Push(IGameState gameState) { if (gameStates.Count > 0) { gameStates.Peek().OnCovered(); } gameStates.Push(gameState); gameState.OnEntered(); }