Exemplo n.º 1
0
        public static BTNode AddChild(BehaviourTree owner, BTNode parent, BTNodeData data)
        {
            var child = new BTNode(owner, parent, data);

            owner.AddNode(child);
            parent.ChildNodeList.Add(child);
            return(child);
        }
Exemplo n.º 2
0
        public static BtNode AddChildNode(BehaviourTree owner, BtNode parent, BtNodeData data)
        {
            data.SetPosition(owner.GenNodePos(data.GetPosition()));             //避免重叠
            var child = new BtNode(owner, parent, data);

            owner.AddNode(child);
            parent.ChildNodeList.Add(child);
            return(child);
        }