예제 #1
0
파일: GameEngine.cs 프로젝트: mrsheen/bbot
        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
        }
예제 #2
0
파일: GameEngine.cs 프로젝트: mrsheen/bbot
        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);
        }