public override void copyto(BehaviorTask target)
        {
            base.copyto(target);

            Debug.Check(target is SingeChildTask);
            SingeChildTask ttask = target as SingeChildTask;

            if (this.m_root != null)
            {
                //referencebehavior/query, etc.
                if (ttask.m_root == null)
                {
                    BehaviorNode pNode = this.m_root.GetNode();
                    Debug.Check(pNode is BehaviorTree);
                    ttask.m_root = pNode.CreateAndInitTask();

                    //Debug.Check(ttask.m_root is BehaviorTreeTask);
                    //BehaviorTreeTask btt = ttask.m_root as BehaviorTreeTask;
                    //btt.ModifyId(ttask);
                }

                Debug.Check(ttask.m_root != null);
                this.m_root.copyto(ttask.m_root);
            }
        }
Exemple #2
0
        public override void copyto(BehaviorTask target)
        {
            base.copyto(target);
            SingeChildTask task = target as SingeChildTask;

            if (this.m_root != null)
            {
                if (task.m_root == null)
                {
                    task.m_root = this.m_root.GetNode().CreateAndInitTask();
                }
                this.m_root.copyto(task.m_root);
            }
        }