Exemplo n.º 1
0
        /// <summary>
        /// 结束行为创建
        /// </summary>
        /// <returns></returns>
        public YuAIBehaviorTree End()
        {
            while (behaviorNodes.Count > 0)
            {
                behaviorNodes.Pop();
            }
            YuAIBehaviorTree tree = new YuAIBehaviorTree(rootBehavior);

            //初始化行为树创建器
            unitEntity   = null;
            rootBehavior = null;

            return(tree);
        }
Exemplo n.º 2
0
        public YuAIBehaviorTree CreateBehaviourTree()
        {
            YuAIBehaviorTree tree = new YuAIBehaviorTree(instance.m_rootBehavior.childNodes[0].BindingBehaviour);

            return(tree);
        }