public override void OnPrepare(BehaviourTreeRunner.AssetBinder binder, BTNode node) { base.OnPrepare(binder, node); blackboard = binder.Blackboard; from = blackboard.GetIndex(m_CopyFrom); to = blackboard.GetIndex(m_CopyTo); }
private void OnDisable() { if (mBinder != null) { mBinder.Dispose(); mBinder = null; } }
public override void OnPrepare(BehaviourTreeRunner.AssetBinder asset, BTNode node) { base.OnPrepare(asset, node); mExecIndex = new int[mChildren.Length]; for (int i = 0; i < mExecIndex.Length; i++) { mExecIndex[i] = i; } }
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; } }
public void Prepare(BehaviourTreeRunner.AssetBinder binder) { mServices.Clear(); for (int i = 0; i < m_BTNodes.Count; i++) { m_BTNodes[i].Asset.OnPrepare(binder, m_BTNodes[i]); if (m_BTNodes[i].Asset is IBTService) { mServices.Add((IBTService)m_BTNodes[i].Asset); } } }
public override void OnPrepare(BehaviourTreeRunner.AssetBinder binder, BTNode node) { base.OnPrepare(binder, node); if (m_BehaviourTree != null) { mBinder = BehaviourTreeRunner.AssetBinder.NewSubBinder(binder); if (mBinder != null) { mBinder.Name = NameSubtree(this); } } }
public override void OnPrepare(BehaviourTreeRunner.AssetBinder binder, BTNode node) { Identify = node.Identify; var p = node.Parent; // TreeAsset.GetNodeById(node.parentId); Parent = p == null ? null : p.Asset as IBTNode; for (int i = 0; i < m_ConditionIds.Count; i++) { var cond = TreeAsset.GetNodeById(m_ConditionIds[i]); if (cond != null) { mConditions.Add(cond.Asset as ICondition); var decor = cond.Asset as IBTNodeDecorator; if (decor != null) { mDecorators.Add(decor); } } } }
public override void OnPrepare(BehaviourTreeRunner.AssetBinder binder, BTNode node) { base.OnPrepare(binder, node); mBlackboard = binder.Blackboard; mPropertyIndex = string.IsNullOrEmpty(m_BlackboardProperty) ? -1 : mBlackboard.GetIndex(m_BlackboardProperty); }
public override void OnPrepare(BehaviourTreeRunner.AssetBinder asset, BTNode node) { base.OnPrepare(asset, node); Init(); }
public override void OnPrepare(BehaviourTreeRunner.AssetBinder binder, BTNode node) { base.OnPrepare(binder, node); mBlackboard = binder.Blackboard; mIndex = mBlackboard.GetIndex(m_VariableName); }
public override void OnPrepare(BehaviourTreeRunner.AssetBinder binder, BTNode node) { base.OnPrepare(binder, node); mBlackboardValue = !string.IsNullOrEmpty(m_UseBlackboard) ? binder.Runner.Blackboard.Value <bool>(m_UseBlackboard) : null; }
public abstract void OnPrepare(BehaviourTreeRunner.AssetBinder assetBinder, BTNode node);