public void EndState() { if (m_cCurrentState != null) { m_cCurrentState.Exit(); } m_cCurrentState = null; }
public void SetState(CStateBase <TYPE> state) { m_CurrentState = state; if (m_CurrentState != null) { m_CurrentState.Enter(m_Object); } }
public void ChangeState(CStateBase <Template> _cState) { if (m_cCurrentState != null) { m_cCurrentState.Exit(); } m_cCurrentState = _cState; m_cCurrentState.Enter(); }
public void ChangeState(CStateBase <TYPE> state) { m_NextState = state; m_PreviosState = m_CurrentState; if (m_PreviosState != null) { m_PreviosState.Exit(m_Object); } if (m_NextState == null) { return; } m_CurrentState = m_NextState; m_NextState.Enter(m_Object); }
public CStateMachine() { m_cCurrentState = null; }
public void Release() { m_Object = default(TYPE); m_CurrentState.Release(); m_CurrentState = null; }
protected virtual void OnStateInterrupted(CStateBase <FSM, ENUM_STATE> pStateInterrupt) { }
public StateMachine(TYPE type) { m_Object = type; m_CurrentState = null; }
protected virtual void OnStateLeave(CStateBase <FSM, ENUM_STATE> pNextState) { }
protected virtual void OnStateEnter(CStateBase <FSM, ENUM_STATE> pPrevState) { }
public void EventStateInterrupted(CStateBase <FSM, ENUM_STATE> pStateInterrupt) { OnStateInterrupted(pStateInterrupt); }
public void EventStateLeave(CStateBase <FSM, ENUM_STATE> pNextState) { OnStateLeave(pNextState); }
public void EventStateEnter(CStateBase <FSM, ENUM_STATE> pPrevState) { OnStateEnter(pPrevState); }