/// <summary> /// Sets the AI behaviour. /// </summary> /// <param name='behaviour'> /// Behaviour. /// </param> public void SetBehaviour(BehaviourState behaviour) { if (currentState != null) { currentState.Clear(); } currentState = behaviour; currentState.Start(this); }