public override void Init(BehaviorNode node) { base.Init(node); Debug.Check(node.GetChildrenCount() > 0); int childrenCount = node.GetChildrenCount(); for (int i = 0; i < childrenCount; i++) { BehaviorNode childNode = node.GetChild(i); BehaviorTask childTask = childNode.CreateAndInitTask(); this.addChild(childTask); } }
//~SingeChildTask() //{ // m_root = null; //} public override void Init(BehaviorNode node) { base.Init(node); Debug.Check(node.GetChildrenCount() <= 1); if (node.GetChildrenCount() == 1) { BehaviorNode childNode = node.GetChild(0); BehaviorTask childTask = childNode.CreateAndInitTask(); this.addChild(childTask); } else { Debug.Check(true); } }
public override void Init(BehaviorNode node) { base.Init(node); int childrenCount = node.GetChildrenCount(); for (int i = 0; i < childrenCount; i++) { BehaviorTask pBehavior = node.GetChild(i).CreateAndInitTask(); this.addChild(pBehavior); } }
public override void Init(BehaviorNode node) { base.Init(node); if (node.GetChildrenCount() == 1) { BehaviorNode child = node.GetChild(0); if (child != null) { BehaviorTask pBehavior = child.CreateAndInitTask(); this.addChild(pBehavior); } } }
public override bool decompose(BehaviorNode branch, PlannerTaskComplex seqTask, int depth, Planner planner) { bool bOk = false; int childCount = branch.GetChildrenCount(); Debug.Check(childCount == 1); BehaviorNode childNode = branch.GetChild(0); PlannerTask childTask = planner.decomposeNode(childNode, depth); if (childTask != null) { seqTask.AddChild(childTask); bOk = true; } return bOk; }
public override bool decompose(BehaviorNode branch, PlannerTaskComplex seqTask, int depth, Planner planner) { bool bOk = false; int childCount = branch.GetChildrenCount(); Debug.Check(childCount == 1); BehaviorNode childNode = branch.GetChild(0); PlannerTask childTask = planner.decomposeNode(childNode, depth); if (childTask != null) { seqTask.AddChild(childTask); bOk = true; } return(bOk); }
public override void Init(BehaviorNode node) { base.Init(node); if (!this.m_bIgnoreChildren) { Debug.Check(node.GetChildrenCount() > 0); int childrenCount = node.GetChildrenCount(); for (int i = 0; i < childrenCount; i++) { BehaviorNode childNode = node.GetChild(i); BehaviorTask childTask = childNode.CreateAndInitTask(); this.addChild(childTask); } } }