Exemple #1
0
 public override void Init(BehaviorBlackboard data)
 {
     base.Init(data);
     if (subTree == null)
     {
         Debug.LogError("Behavor Tree Designer\nNo subtree assigned!");
         return;
     }
     subRoot = subTree.GetRootNode();
     subRoot.Init(data);
 }
        private void Start()
        {
            if (behaviorTree == null)
            {
                Debug.LogError("Behavor Tree Designer\nNo behavior assigned!");
                return;
            }
            if (agent == null)
            {
                Debug.LogError("Behavor Tree Designer\nNo agent assigned!");
                return;
            }

            data = new BehaviorBlackboard();
            data.Add("Agent", agent);
            rootNode = behaviorTree.GetRootNode();
            rootNode.Init(data);
            InvokeRepeating("DoTick", 0, tickTime);
        }
 private void Start()
 {
     rootNode.Init(data);
     InvokeRepeating("DoTick", 0, tickTime);
 }