Example #1
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/action_ut_waitforsignal_2");
			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 node3 = new And();
							node3.SetClassNameString("And");
							node3.SetId(3);
#if !BEHAVIAC_RELEASE
							node3.SetAgentType("AgentNodeTest");
#endif
							node2.AddChild(node3);
							{
								Condition_bt_node_test_action_ut_waitforsignal_2_node5 node5 = new Condition_bt_node_test_action_ut_waitforsignal_2_node5();
								node5.SetClassNameString("Condition");
								node5.SetId(5);
#if !BEHAVIAC_RELEASE
								node5.SetAgentType("AgentNodeTest");
#endif
								node3.AddChild(node5);
								node3.SetHasEvents(node3.HasEvents() | node5.HasEvents());
							}
							{
								Condition_bt_node_test_action_ut_waitforsignal_2_node6 node6 = new Condition_bt_node_test_action_ut_waitforsignal_2_node6();
								node6.SetClassNameString("Condition");
								node6.SetId(6);
#if !BEHAVIAC_RELEASE
								node6.SetAgentType("AgentNodeTest");
#endif
								node3.AddChild(node6);
								node3.SetHasEvents(node3.HasEvents() | node6.HasEvents());
							}
							node2.SetHasEvents(node2.HasEvents() | node3.HasEvents());
						}
						{
							Condition_bt_node_test_action_ut_waitforsignal_2_node7 node7 = new Condition_bt_node_test_action_ut_waitforsignal_2_node7();
							node7.SetClassNameString("Condition");
							node7.SetId(7);
#if !BEHAVIAC_RELEASE
							node7.SetAgentType("AgentNodeTest");
#endif
							node2.AddChild(node7);
							node2.SetHasEvents(node2.HasEvents() | node7.HasEvents());
						}
						node1.SetHasEvents(node1.HasEvents() | node2.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Assignment_bt_node_test_action_ut_waitforsignal_2_node4 node4 = new Assignment_bt_node_test_action_ut_waitforsignal_2_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;
		}
Example #2
0
 public static bool build_behavior_tree(BehaviorTree bt)
 {
     bt.SetClassNameString("BehaviorTree");
     bt.SetId(-1);
     bt.SetName("node_test/action_ut_waitforsignal_2");
     #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_2_attach2 attach2 = new Predicate_bt_node_test_action_ut_waitforsignal_2_attach2();
                 attach2.SetClassNameString("Predicate");
                 attach2.SetId(2);
     #if !BEHAVIAC_RELEASE
                 attach2.SetAgentType("AgentNodeTest");
     #endif
                 node1.Attach(attach2);
             }
             {
                 Predicate_bt_node_test_action_ut_waitforsignal_2_attach5 attach5 = new Predicate_bt_node_test_action_ut_waitforsignal_2_attach5();
                 attach5.SetClassNameString("Predicate");
                 attach5.SetId(5);
     #if !BEHAVIAC_RELEASE
                 attach5.SetAgentType("AgentNodeTest");
     #endif
                 node1.Attach(attach5);
             }
             {
                 Predicate_bt_node_test_action_ut_waitforsignal_2_attach6 attach6 = new Predicate_bt_node_test_action_ut_waitforsignal_2_attach6();
                 attach6.SetClassNameString("Predicate");
                 attach6.SetId(6);
     #if !BEHAVIAC_RELEASE
                 attach6.SetAgentType("AgentNodeTest");
     #endif
                 node1.Attach(attach6);
             }
             node0.AddChild(node1);
             node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
         }
         {
             Assignment_bt_node_test_action_ut_waitforsignal_2_node4 node4 = new Assignment_bt_node_test_action_ut_waitforsignal_2_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;
 }