示例#1
0
 public void ChangeState(CGameState state)
 {
     if (states.Count > 0) {
         ((CGameState)states.Peek()).Cleanup();
         states.Pop();
     }
     states.Push(state);
     ((CGameState)states.Peek()).Init();
 }
示例#2
0
 public void PushState(CGameState state)
 {
     if (states.Count > 0) {
         ((CGameState)states.Peek()).Pause();
     }
     states.Push(state);
     ((CGameState)states.Peek()).Init();
 }