示例#1
0
 public override void OnPrepare(BehaviourTreeRunner.AssetBinder binder, BTNode node)
 {
     base.OnPrepare(binder, node);
     mLoopers = new BehaviourLooper[node.ChildrenCount];
     for (int i = 0; i < mLoopers.Length; i++)
     {
         mLoopers[i] = binder.Looper.CreateSubLooper();
         mLoopers[i].SetBehaviuor(node.ChildAt(i).Asset as IBTNode);
     }
 }
 public override void OnPrepare(BehaviourTreeRunner.AssetBinder asset, BTNode node)
 {
     base.OnPrepare(asset, node);
     mChildren = new IBTNode[node.ChildrenCount];
     for (int i = 0; i < mChildren.Length; i++)
     {
         var child = node.ChildAt(i);
         mChildren[i] = child == null ? null : child.Asset as IBTNode;
     }
 }