Exemplo n.º 1
0
 public void SetState(CStateBase <TYPE> state)
 {
     m_CurrentState = state;
     if (m_CurrentState != null)
     {
         m_CurrentState.Enter(m_Object);
     }
 }
Exemplo n.º 2
0
    public void ChangeState(CStateBase <Template> _cState)
    {
        if (m_cCurrentState != null)
        {
            m_cCurrentState.Exit();
        }

        m_cCurrentState = _cState;
        m_cCurrentState.Enter();
    }
Exemplo n.º 3
0
        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);
        }