Exemplo n.º 1
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/enter_exit_action_ut_1");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// children
			{
				Parallel_bt_node_test_enter_exit_action_ut_1_node0 node0 = new Parallel_bt_node_test_enter_exit_action_ut_1_node0();
				node0.SetClassNameString("Parallel");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("AgentNodeTest");
#endif
				// attachments
				{
					Precondition_bt_node_test_enter_exit_action_ut_1_attach1 attach1 = new Precondition_bt_node_test_enter_exit_action_ut_1_attach1();
					attach1.SetClassNameString("Precondition");
					attach1.SetId(1);
#if !BEHAVIAC_RELEASE
					attach1.SetAgentType("AgentNodeTest");
#endif
					node0.Attach(attach1, true, false, false);
				}
				{
					Effector_bt_node_test_enter_exit_action_ut_1_attach2 attach2 = new Effector_bt_node_test_enter_exit_action_ut_1_attach2();
					attach2.SetClassNameString("Effector");
					attach2.SetId(2);
#if !BEHAVIAC_RELEASE
					attach2.SetAgentType("AgentNodeTest");
#endif
					node0.Attach(attach2, false, true, false);
				}
				bt.AddChild(node0);
				{
					WaitforSignal node3 = new WaitforSignal();
					node3.SetClassNameString("WaitforSignal");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("AgentNodeTest");
#endif
					// attachments
					{
						Precondition_bt_node_test_enter_exit_action_ut_1_attach4 attach4 = new Precondition_bt_node_test_enter_exit_action_ut_1_attach4();
						attach4.SetClassNameString("Precondition");
						attach4.SetId(4);
#if !BEHAVIAC_RELEASE
						attach4.SetAgentType("AgentNodeTest");
#endif
						node3.Attach(attach4, true, false, false);
					}
					{
						Effector_bt_node_test_enter_exit_action_ut_1_attach5 attach5 = new Effector_bt_node_test_enter_exit_action_ut_1_attach5();
						attach5.SetClassNameString("Effector");
						attach5.SetId(5);
#if !BEHAVIAC_RELEASE
						attach5.SetAgentType("AgentNodeTest");
#endif
						node3.Attach(attach5, false, true, false);
					}
					node0.AddChild(node3);
					{
						Condition_bt_node_test_enter_exit_action_ut_1_node6 node6 = new Condition_bt_node_test_enter_exit_action_ut_1_node6();
						node6.SetClassNameString("Condition");
						node6.SetId(6);
#if !BEHAVIAC_RELEASE
						node6.SetAgentType("AgentNodeTest");
#endif
						node3.SetCustomCondition(node6);
						node3.SetHasEvents(node3.HasEvents() | node6.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
				}
				{
					True node7 = new True();
					node7.SetClassNameString("True");
					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;
		}
Exemplo n.º 2
0
 public static bool build_behavior_tree(BehaviorTree bt)
 {
     bt.SetClassNameString("BehaviorTree");
     bt.SetId(-1);
     bt.SetName("node_test/enter_exit_action_ut_1");
     #if !BEHAVIAC_RELEASE
     bt.SetAgentType("AgentNodeTest");
     #endif
     // children
     {
         Parallel_bt_node_test_enter_exit_action_ut_1_node0 node0 = new Parallel_bt_node_test_enter_exit_action_ut_1_node0();
         node0.SetClassNameString("Parallel");
         node0.SetId(0);
     #if !BEHAVIAC_RELEASE
         node0.SetAgentType("AgentNodeTest");
     #endif
         bt.AddChild(node0);
         {
             WaitforSignal_bt_node_test_enter_exit_action_ut_1_node3 node3 = new WaitforSignal_bt_node_test_enter_exit_action_ut_1_node3();
             node3.SetClassNameString("WaitforSignal");
             node3.SetId(3);
     #if !BEHAVIAC_RELEASE
             node3.SetAgentType("AgentNodeTest");
     #endif
             // attachments
             {
                 Predicate_bt_node_test_enter_exit_action_ut_1_attach5 attach5 = new Predicate_bt_node_test_enter_exit_action_ut_1_attach5();
                 attach5.SetClassNameString("Predicate");
                 attach5.SetId(5);
     #if !BEHAVIAC_RELEASE
                 attach5.SetAgentType("AgentNodeTest");
     #endif
                 node3.Attach(attach5);
             }
             node0.AddChild(node3);
             node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
         }
         {
             True node4 = new True();
             node4.SetClassNameString("True");
             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;
 }