Ejemplo n.º 1
0
    public void ChangeState(AI_State newState)
    {
        if (newState == null)
        {
            return;
        }

        if (_CurrentSate != null)
        {
            _CurrentSate.ExitState(this);
        }

        _CurrentSate = newState;
        _CurrentSate.EnterState(this);
    }
Ejemplo n.º 2
0
 private void OnExitState()
 {
     m_currentState.ExitState(this);
     m_stateTimeElapsed = 0;
 }
Ejemplo n.º 3
0
 public void SwitchState(AI_State state)
 {
     currentState.ExitState(this);
     currentState = state;
     currentState.InitilizeState(this);
 }