public static bool build_behavior_tree(BehaviorTree bt) { bt.SetClassNameString("BehaviorTree"); bt.SetId(-1); bt.SetName("node_test/query_subtree_2"); bt.IsFSM = false; #if !BEHAVIAC_RELEASE bt.SetAgentType("AgentNodeTest"); #endif bt.SetDomains("test subtree2"); bt.SetDescriptors("1:{Descriptor=int Self.AgentNodeTest::testVar_1;Reference=const int 80;}"); // children { Sequence node0 = new Sequence(); node0.SetClassNameString("Sequence"); node0.SetId(0); #if !BEHAVIAC_RELEASE node0.SetAgentType("AgentNodeTest"); #endif bt.AddChild(node0); { Action_bt_node_test_query_subtree_2_node1 node1 = new Action_bt_node_test_query_subtree_2_node1(); node1.SetClassNameString("Action"); node1.SetId(1); #if !BEHAVIAC_RELEASE node1.SetAgentType("AgentNodeTest"); #endif node0.AddChild(node1); node0.SetHasEvents(node0.HasEvents() | node1.HasEvents()); } { True node2 = new True(); node2.SetClassNameString("True"); node2.SetId(2); #if !BEHAVIAC_RELEASE node2.SetAgentType("AgentNodeTest"); #endif node0.AddChild(node2); node0.SetHasEvents(node0.HasEvents() | node2.HasEvents()); } bt.SetHasEvents(bt.HasEvents() | node0.HasEvents()); } return true; }