public void PopState() { if (StateStack.Count > 0) { StateStack.RemoveAt(0); } if (StateStack.Count > 0) { var state = StateStack.ElementAt(0); NextState = state; NextState.OnEnter(); } }
public void PopState() { if (StateStack.Count > 0) { StateStack.RemoveAt(0); } if (StateStack.Count > 0) { string state = StateStack.ElementAt(0); 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; } } }