private void SetCurrState(CBaseState state) { m_lastState = m_currState; m_currState = state; if (m_lastState != null) { m_lastState.Exit(this); } m_currState.Enter(this); }
/// <summary> /// 全局状态机开始运行 /// </summary> public void StartGlbalState() { m_globalState.Enter(this); }