public static bool build_behavior_tree(BehaviorTree bt) { bt.SetClassNameString("BehaviorTree"); bt.SetId(-1); bt.SetName("node_test/action_ut_waitforsignal_1"); bt.IsFSM = false; #if !BEHAVIAC_RELEASE bt.SetAgentType("AgentNodeTest"); #endif // children { Sequence node0 = new Sequence(); node0.SetClassNameString("Sequence"); node0.SetId(0); #if !BEHAVIAC_RELEASE node0.SetAgentType("AgentNodeTest"); #endif bt.AddChild(node0); { WaitforSignal node1 = new WaitforSignal(); node1.SetClassNameString("WaitforSignal"); node1.SetId(1); #if !BEHAVIAC_RELEASE node1.SetAgentType("AgentNodeTest"); #endif node0.AddChild(node1); { Or node2 = new Or(); node2.SetClassNameString("Or"); node2.SetId(2); #if !BEHAVIAC_RELEASE node2.SetAgentType("AgentNodeTest"); #endif node1.SetCustomCondition(node2); { And node5 = new And(); node5.SetClassNameString("And"); node5.SetId(5); #if !BEHAVIAC_RELEASE node5.SetAgentType("AgentNodeTest"); #endif node2.AddChild(node5); { Condition_bt_node_test_action_ut_waitforsignal_1_node6 node6 = new Condition_bt_node_test_action_ut_waitforsignal_1_node6(); node6.SetClassNameString("Condition"); node6.SetId(6); #if !BEHAVIAC_RELEASE node6.SetAgentType("AgentNodeTest"); #endif node5.AddChild(node6); node5.SetHasEvents(node5.HasEvents() | node6.HasEvents()); } { Condition_bt_node_test_action_ut_waitforsignal_1_node7 node7 = new Condition_bt_node_test_action_ut_waitforsignal_1_node7(); node7.SetClassNameString("Condition"); node7.SetId(7); #if !BEHAVIAC_RELEASE node7.SetAgentType("AgentNodeTest"); #endif node5.AddChild(node7); node5.SetHasEvents(node5.HasEvents() | node7.HasEvents()); } node2.SetHasEvents(node2.HasEvents() | node5.HasEvents()); } { Condition_bt_node_test_action_ut_waitforsignal_1_node8 node8 = new Condition_bt_node_test_action_ut_waitforsignal_1_node8(); node8.SetClassNameString("Condition"); node8.SetId(8); #if !BEHAVIAC_RELEASE node8.SetAgentType("AgentNodeTest"); #endif node2.AddChild(node8); node2.SetHasEvents(node2.HasEvents() | node8.HasEvents()); } node1.SetHasEvents(node1.HasEvents() | node2.HasEvents()); } { Assignment_bt_node_test_action_ut_waitforsignal_1_node3 node3 = new Assignment_bt_node_test_action_ut_waitforsignal_1_node3(); node3.SetClassNameString("Assignment"); node3.SetId(3); #if !BEHAVIAC_RELEASE node3.SetAgentType("AgentNodeTest"); #endif node1.AddChild(node3); node1.SetHasEvents(node1.HasEvents() | node3.HasEvents()); } node0.SetHasEvents(node0.HasEvents() | node1.HasEvents()); } { Assignment_bt_node_test_action_ut_waitforsignal_1_node4 node4 = new Assignment_bt_node_test_action_ut_waitforsignal_1_node4(); node4.SetClassNameString("Assignment"); node4.SetId(4); #if !BEHAVIAC_RELEASE node4.SetAgentType("AgentNodeTest"); #endif node0.AddChild(node4); node0.SetHasEvents(node0.HasEvents() | node4.HasEvents()); } bt.SetHasEvents(bt.HasEvents() | node0.HasEvents()); } return true; }
public static bool build_behavior_tree(BehaviorTree bt) { bt.SetClassNameString("BehaviorTree"); bt.SetId(-1); bt.SetName("node_test/action_ut_waitforsignal_1"); #if !BEHAVIAC_RELEASE bt.SetAgentType("AgentNodeTest"); #endif // children { Sequence node0 = new Sequence(); node0.SetClassNameString("Sequence"); node0.SetId(0); #if !BEHAVIAC_RELEASE node0.SetAgentType("AgentNodeTest"); #endif bt.AddChild(node0); { WaitforSignal node1 = new WaitforSignal(); node1.SetClassNameString("WaitforSignal"); node1.SetId(1); #if !BEHAVIAC_RELEASE node1.SetAgentType("AgentNodeTest"); #endif // attachments { Predicate_bt_node_test_action_ut_waitforsignal_1_attach2 attach2 = new Predicate_bt_node_test_action_ut_waitforsignal_1_attach2(); attach2.SetClassNameString("Predicate"); attach2.SetId(2); #if !BEHAVIAC_RELEASE attach2.SetAgentType("AgentNodeTest"); #endif node1.Attach(attach2); } { Predicate_bt_node_test_action_ut_waitforsignal_1_attach5 attach5 = new Predicate_bt_node_test_action_ut_waitforsignal_1_attach5(); attach5.SetClassNameString("Predicate"); attach5.SetId(5); #if !BEHAVIAC_RELEASE attach5.SetAgentType("AgentNodeTest"); #endif node1.Attach(attach5); } { Predicate_bt_node_test_action_ut_waitforsignal_1_attach6 attach6 = new Predicate_bt_node_test_action_ut_waitforsignal_1_attach6(); attach6.SetClassNameString("Predicate"); attach6.SetId(6); #if !BEHAVIAC_RELEASE attach6.SetAgentType("AgentNodeTest"); #endif node1.Attach(attach6); } node0.AddChild(node1); { Assignment_bt_node_test_action_ut_waitforsignal_1_node3 node3 = new Assignment_bt_node_test_action_ut_waitforsignal_1_node3(); node3.SetClassNameString("Assignment"); node3.SetId(3); #if !BEHAVIAC_RELEASE node3.SetAgentType("AgentNodeTest"); #endif node1.AddChild(node3); node1.SetHasEvents(node1.HasEvents() | node3.HasEvents()); } node0.SetHasEvents(node0.HasEvents() | node1.HasEvents()); } { Assignment_bt_node_test_action_ut_waitforsignal_1_node4 node4 = new Assignment_bt_node_test_action_ut_waitforsignal_1_node4(); node4.SetClassNameString("Assignment"); node4.SetId(4); #if !BEHAVIAC_RELEASE node4.SetAgentType("AgentNodeTest"); #endif node0.AddChild(node4); node0.SetHasEvents(node0.HasEvents() | node4.HasEvents()); } bt.SetHasEvents(bt.HasEvents() | node0.HasEvents()); } return true; }