public void PushState(BaseGameState newState) { game.Debug(String.Format("Pushing state from {0} to {1}", states.Count > 0 ? states.Peek().AssetName : "-none-", newState.AssetName)); if (states.Count > 0) states.Peek().Pause(); states.Push(newState); states.Peek().Init(game); //SendInputClass.Move(0, 0);// TODO Move to form pause button in some way }
public void ChangeState(BaseGameState newState) { game.Debug(String.Format("Changing state from {0} to {1}", states.Count > 0 ? states.Peek().AssetName : "-none-", newState.AssetName)); if (states.Count > 0) states.Pop().Cleanup(); states.Push(newState); states.Peek().Init(game); }