/// <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); }
/// <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); }