Example #1
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/enter_exit_action_ut_2");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// children
			{
				Parallel_bt_node_test_enter_exit_action_ut_2_node0 node0 = new Parallel_bt_node_test_enter_exit_action_ut_2_node0();
				node0.SetClassNameString("Parallel");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("AgentNodeTest");
#endif
				// attachments
				{
					Precondition_bt_node_test_enter_exit_action_ut_2_attach1 attach1 = new Precondition_bt_node_test_enter_exit_action_ut_2_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_2_attach2 attach2 = new Effector_bt_node_test_enter_exit_action_ut_2_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_2_attach4 attach4 = new Precondition_bt_node_test_enter_exit_action_ut_2_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_2_attach5 attach5 = new Effector_bt_node_test_enter_exit_action_ut_2_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_2_node8 node8 = new Condition_bt_node_test_enter_exit_action_ut_2_node8();
						node8.SetClassNameString("Condition");
						node8.SetId(8);
#if !BEHAVIAC_RELEASE
						node8.SetAgentType("AgentNodeTest");
#endif
						node3.SetCustomCondition(node8);
						node3.SetHasEvents(node3.HasEvents() | node8.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
				}
				{
					Action_bt_node_test_enter_exit_action_ut_2_node9 node9 = new Action_bt_node_test_enter_exit_action_ut_2_node9();
					node9.SetClassNameString("Action");
					node9.SetId(9);
#if !BEHAVIAC_RELEASE
					node9.SetAgentType("AgentNodeTest");
#endif
					// attachments
					{
						Precondition_bt_node_test_enter_exit_action_ut_2_attach6 attach6 = new Precondition_bt_node_test_enter_exit_action_ut_2_attach6();
						attach6.SetClassNameString("Precondition");
						attach6.SetId(6);
#if !BEHAVIAC_RELEASE
						attach6.SetAgentType("AgentNodeTest");
#endif
						node9.Attach(attach6, true, false, false);
					}
					{
						Effector_bt_node_test_enter_exit_action_ut_2_attach7 attach7 = new Effector_bt_node_test_enter_exit_action_ut_2_attach7();
						attach7.SetClassNameString("Effector");
						attach7.SetId(7);
#if !BEHAVIAC_RELEASE
						attach7.SetAgentType("AgentNodeTest");
#endif
						node9.Attach(attach7, false, true, false);
					}
					node0.AddChild(node9);
					node0.SetHasEvents(node0.HasEvents() | node9.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/enter_exit_action_ut_2");
     #if !BEHAVIAC_RELEASE
     bt.SetAgentType("AgentNodeTest");
     #endif
     // children
     {
         Parallel_bt_node_test_enter_exit_action_ut_2_node0 node0 = new Parallel_bt_node_test_enter_exit_action_ut_2_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_2_node3 node3 = new WaitforSignal_bt_node_test_enter_exit_action_ut_2_node3();
             node3.SetClassNameString("WaitforSignal");
             node3.SetId(3);
     #if !BEHAVIAC_RELEASE
             node3.SetAgentType("AgentNodeTest");
     #endif
             // attachments
             {
                 Predicate_bt_node_test_enter_exit_action_ut_2_attach5 attach5 = new Predicate_bt_node_test_enter_exit_action_ut_2_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());
         }
         {
             Action_bt_node_test_enter_exit_action_ut_2_node1 node1 = new Action_bt_node_test_enter_exit_action_ut_2_node1();
             node1.SetClassNameString("Action");
             node1.SetId(1);
     #if !BEHAVIAC_RELEASE
             node1.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node1);
             node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
         }
         bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
     }
     return true;
 }