public override void Construct(MyObjectBuilder_BehaviorTreeNode nodeDefinition, MyBehaviorTree.MyBehaviorTreeDesc treeDesc) { base.Construct(nodeDefinition, treeDesc); m_child = MyBehaviorTreeNodeFactory.CreateBTNode(nodeDefinition); m_child.Construct(nodeDefinition, treeDesc); }
public override void Construct(MyObjectBuilder_BehaviorTreeNode nodeDefinition, MyBehaviorTree.MyBehaviorTreeDesc treeDesc) { base.Construct(nodeDefinition, treeDesc); MyObjectBuilder_BehaviorControlBaseNode node = (MyObjectBuilder_BehaviorControlBaseNode)nodeDefinition; this.m_children = new List <MyBehaviorTreeNode>(node.BTNodes.Length); this.m_isMemorable = node.IsMemorable; this.m_name = node.Name; foreach (MyObjectBuilder_BehaviorTreeNode node2 in node.BTNodes) { MyBehaviorTreeNode item = MyBehaviorTreeNodeFactory.CreateBTNode(node2); item.Construct(node2, treeDesc); this.m_children.Add(item); } }
public override void Construct(MyObjectBuilder_BehaviorTreeNode nodeDefinition, MyBehaviorTree.MyBehaviorTreeDesc treeDesc) { base.Construct(nodeDefinition, treeDesc); var ob = nodeDefinition as MyObjectBuilder_BehaviorTreeDecoratorNode; m_defaultReturnValue = (MyBehaviorTreeState)((byte)ob.DefaultReturnValue); m_decoratorLogicName = ob.DecoratorLogic.GetType().Name; m_decoratorLogic = GetDecoratorLogic(ob.DecoratorLogic); m_decoratorLogic.Construct(ob.DecoratorLogic); if (ob.BTNode != null) { m_child = MyBehaviorTreeNodeFactory.CreateBTNode(ob.BTNode); m_child.Construct(ob.BTNode, treeDesc); } }
public void Construct() { ClearData(); m_root = new MyBehaviorTreeRoot(); m_root.Construct(m_behaviorDefinition.FirstNode, m_treeDesc); }