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

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

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