예제 #1
0
 /// <summary>
 /// Push a new active state on the engine stack.
 /// </summary>
 /// <param name="state">State that we will switch to</param>
 public void PushState(IGameState state)
 {
     Console.Write("state pushed");
     if(_states.Count>0)
     _states.Peek().Pause();
     state.Init(this);
     _states.Push(state);
 }
예제 #2
0
 /// <summary>
 /// Push a new active state on the engine stack.
 /// </summary>
 /// <param name="state">State that we will switch to</param>
 public void PushState(IGameState state)
 {
     _states.Peek().Pause();
     state.Init(this);
     _states.Push(state);
 }