Пример #1
0
        public void PushState(string state)
        {
            NextState = state;
            States[NextState].OnEnter();
            States[NextState].TransitionValue = 0.0f;
            States[NextState].Transitioning   = GameState.TransitionMode.Entering;

            if (CurrentState != "")
            {
                States[CurrentState].Transitioning   = GameState.TransitionMode.Exiting;
                States[CurrentState].TransitionValue = 0.0f;
            }

            StateStack.Insert(0, state);
        }
Пример #2
0
 public void PushState(GameState state)
 {
     NextState = state;
     NextState.OnEnter();
     StateStack.Insert(0, NextState);
 }