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); }
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); }