Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
 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);
         }
     }
 }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
0
        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;
        }
Beispiel #5
0
        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);
        }
        //~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);
            }
        }
Beispiel #7
0
        //~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);
            }
        }
Beispiel #8
0
        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);
                }
            }
        }