public void ChangeState(AI_State newState) { if (newState == null) { return; } if (_CurrentSate != null) { _CurrentSate.ExitState(this); } _CurrentSate = newState; _CurrentSate.EnterState(this); }
private void OnExitState() { m_currentState.ExitState(this); m_stateTimeElapsed = 0; }
public void SwitchState(AI_State state) { currentState.ExitState(this); currentState = state; currentState.InitilizeState(this); }