public void SwitchState(string newState) { UIState state = FindState(newState); if (state == null) { Debug.Log("不能找到,是不是名字出错了"); return; } m_StateList[m_StateList.Count - 1].Exit(state); state.Enter(m_StateList[m_StateList.Count - 1]); m_StateList.RemoveAt(m_StateList.Count - 1); m_StateList.Add(state); }
public void PushState(UIState newState) { uiStateStack.Peek().Exit(); uiStateStack.Push(newState); newState.Enter(); }
public void SwtichState(UIState newState) { uiStateStack.Pop().Exit(); uiStateStack.Push(newState); newState.Enter(); }
public void TransitionState(int id) { currentState.Exit(); currentState = states[id]; currentState.Enter(); }
public void PushCascadeState(UIState newState) { uiStateStack.Push(newState); newState.Enter(); }