/// <summary> /// Called on the frame when this behaviour becomes enabled. /// </summary> private void Start() { if (startState != null) { currState = startState; } }
/// <summary> /// Changes the current state to the one provided, as long as the Object provided is type of AI_State. /// </summary> /// <param name="nextState">State that will become the new current state.</param> public void ChangeState(Object nextState) { AI_State state = nextState as AI_State; if (state != null) { ChangeState(state); } }
/// <summary> /// Changes the current state to the one provided. /// </summary> /// <param name="nextState">State that will become the new current state.</param> public void ChangeState(AI_State nextState) { currState = nextState; }