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); }