Beispiel #1
0
 /// <summary>
 /// Destroys behavior tree instance
 /// </summary>
 public void RemoveBTInstance()
 {
     if (BTInstance != null && BTInstance.IsValid())
     {
         RemoveTask(BTInstance.Root);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Loads behavior tree instance
 /// </summary>
 public void LoadBTInstance()
 {
     if (BehaviorTree != null && BehaviorTree.IsValid())
     {
         BTInstance = MoonBT.CopyBT(BehaviorTree);
     }
     else
     {
         Debug.LogWarning("[MoonBehavior] " + name + ": Invalid BehaviorTree");
         enabled = false;
         return;
     }
 }