public static bool build_behavior_tree(BehaviorTree bt) { bt.SetClassNameString("BehaviorTree"); bt.SetId(-1); bt.SetName("node_test/event_ut_0"); #if !BEHAVIAC_RELEASE bt.SetAgentType("AgentNodeTest"); #endif // attachments { Event_bt_node_test_event_ut_0_attach1 attach1 = new Event_bt_node_test_event_ut_0_attach1(); attach1.SetClassNameString("Event"); attach1.SetId(1); #if !BEHAVIAC_RELEASE attach1.SetAgentType("AgentNodeTest"); #endif attach1.Initialize("Self.AgentNodeTest::event_test_void()", "node_test/event_subtree_0", TriggerMode.TM_Return, false); bt.Attach(attach1); bt.SetHasEvents(bt.HasEvents() | (attach1 is Event)); } { Event_bt_node_test_event_ut_0_attach2 attach2 = new Event_bt_node_test_event_ut_0_attach2(); attach2.SetClassNameString("Event"); attach2.SetId(2); #if !BEHAVIAC_RELEASE attach2.SetAgentType("AgentNodeTest"); #endif attach2.Initialize("Self.AgentNodeTest::event_test_int(0)", "node_test/event_subtree_1", TriggerMode.TM_Return, false); // pars attach2.AddPar("int", "par_event_param_int", "0", "AgentNodeTest::event_test_int::param0"); bt.Attach(attach2); bt.SetHasEvents(bt.HasEvents() | (attach2 is Event)); } { Event_bt_node_test_event_ut_0_attach3 attach3 = new Event_bt_node_test_event_ut_0_attach3(); attach3.SetClassNameString("Event"); attach3.SetId(3); #if !BEHAVIAC_RELEASE attach3.SetAgentType("AgentNodeTest"); #endif attach3.Initialize("Self.AgentNodeTest::event_test_int_bool(0,false)", "node_test/event_subtree_2", TriggerMode.TM_Return, false); // pars attach3.AddPar("int", "par_event_param_int", "0", "AgentNodeTest::event_test_int_bool::param0"); attach3.AddPar("bool", "par_event_param_int_bool", "false", "AgentNodeTest::event_test_int_bool::param1"); bt.Attach(attach3); bt.SetHasEvents(bt.HasEvents() | (attach3 is Event)); } { Event_bt_node_test_event_ut_0_attach4 attach4 = new Event_bt_node_test_event_ut_0_attach4(); attach4.SetClassNameString("Event"); attach4.SetId(4); #if !BEHAVIAC_RELEASE attach4.SetAgentType("AgentNodeTest"); #endif attach4.Initialize("Self.AgentNodeTest::event_test_int_bool_float(0,false,0)", "node_test/event_subtree_3", TriggerMode.TM_Return, false); // pars attach4.AddPar("int", "par_event_param_int", "0", "AgentNodeTest::event_test_int_bool_float::param0"); attach4.AddPar("bool", "par_event_param_bool", "false", "AgentNodeTest::event_test_int_bool_float::param1"); attach4.AddPar("float", "par_event_param_float", "0", "AgentNodeTest::event_test_int_bool_float::param2"); bt.Attach(attach4); bt.SetHasEvents(bt.HasEvents() | (attach4 is Event)); } // children { Sequence node0 = new Sequence(); node0.SetClassNameString("Sequence"); node0.SetId(0); #if !BEHAVIAC_RELEASE node0.SetAgentType("AgentNodeTest"); #endif bt.AddChild(node0); { WaitforSignal node5 = new WaitforSignal(); node5.SetClassNameString("WaitforSignal"); node5.SetId(5); #if !BEHAVIAC_RELEASE node5.SetAgentType("AgentNodeTest"); #endif // attachments { Predicate_bt_node_test_event_ut_0_attach6 attach6 = new Predicate_bt_node_test_event_ut_0_attach6(); attach6.SetClassNameString("Predicate"); attach6.SetId(6); #if !BEHAVIAC_RELEASE attach6.SetAgentType("AgentNodeTest"); #endif node5.Attach(attach6); } node0.AddChild(node5); node0.SetHasEvents(node0.HasEvents() | node5.HasEvents()); } { Action_bt_node_test_event_ut_0_node7 node7 = new Action_bt_node_test_event_ut_0_node7(); node7.SetClassNameString("Action"); node7.SetId(7); #if !BEHAVIAC_RELEASE node7.SetAgentType("AgentNodeTest"); #endif node0.AddChild(node7); node0.SetHasEvents(node0.HasEvents() | node7.HasEvents()); } bt.SetHasEvents(bt.HasEvents() | node0.HasEvents()); } return true; }