public override void TransitionToState(AI_State nextAIState) { if (nextAIState != remainInAIState) { currentAIState.ExitState(this); OnExitState(); currentAIState = nextAIState; currentAIState.EnterState(this); } }
public void ChangeState(AI_State newState) { if (newState == null) { return; } if (_CurrentSate != null) { _CurrentSate.ExitState(this); } _CurrentSate = newState; _CurrentSate.EnterState(this); }
private void OnEnterState() { m_transitionsDelayCoefficient = Random.Range(0.0f, 1.0f); m_currentState.EnterState(this); }