Beispiel #1
0
 void Awake()
 {
     brain = new Think(gameObject);
     brain.AddSubtask(new Arbitrate(gameObject));
 }
Beispiel #2
0
 /// <summary>
 /// Tells the game object to move to the specified position.
 /// </summary>
 /// <param name="position">The position where to move.</param>
 public void DoMove(Vector2 position)
 {
     brain.RemoveAllSubtasks();
     brain.AddSubtask(new Move(gameObject, position, 0.5f));
 }