Example #1
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/decoration_countlimit_ut_3");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// children
			{
				Selector node0 = new Selector();
				node0.SetClassNameString("Selector");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("AgentNodeTest");
#endif
				bt.AddChild(node0);
				{
					DecoratorCountLimit_bt_node_test_decoration_countlimit_ut_3_node1 node1 = new DecoratorCountLimit_bt_node_test_decoration_countlimit_ut_3_node1();
					node1.SetClassNameString("DecoratorCountLimit");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node1);
					{
						Or node4 = new Or();
						node4.SetClassNameString("Or");
						node4.SetId(4);
#if !BEHAVIAC_RELEASE
						node4.SetAgentType("AgentNodeTest");
#endif
						node1.SetCustomCondition(node4);
						{
							And node5 = new And();
							node5.SetClassNameString("And");
							node5.SetId(5);
#if !BEHAVIAC_RELEASE
							node5.SetAgentType("AgentNodeTest");
#endif
							node4.AddChild(node5);
							{
								Condition_bt_node_test_decoration_countlimit_ut_3_node6 node6 = new Condition_bt_node_test_decoration_countlimit_ut_3_node6();
								node6.SetClassNameString("Condition");
								node6.SetId(6);
#if !BEHAVIAC_RELEASE
								node6.SetAgentType("AgentNodeTest");
#endif
								node5.AddChild(node6);
								node5.SetHasEvents(node5.HasEvents() | node6.HasEvents());
							}
							{
								Condition_bt_node_test_decoration_countlimit_ut_3_node7 node7 = new Condition_bt_node_test_decoration_countlimit_ut_3_node7();
								node7.SetClassNameString("Condition");
								node7.SetId(7);
#if !BEHAVIAC_RELEASE
								node7.SetAgentType("AgentNodeTest");
#endif
								node5.AddChild(node7);
								node5.SetHasEvents(node5.HasEvents() | node7.HasEvents());
							}
							node4.SetHasEvents(node4.HasEvents() | node5.HasEvents());
						}
						{
							Condition_bt_node_test_decoration_countlimit_ut_3_node8 node8 = new Condition_bt_node_test_decoration_countlimit_ut_3_node8();
							node8.SetClassNameString("Condition");
							node8.SetId(8);
#if !BEHAVIAC_RELEASE
							node8.SetAgentType("AgentNodeTest");
#endif
							node4.AddChild(node8);
							node4.SetHasEvents(node4.HasEvents() | node8.HasEvents());
						}
						node1.SetHasEvents(node1.HasEvents() | node4.HasEvents());
					}
					{
						Action_bt_node_test_decoration_countlimit_ut_3_node2 node2 = new Action_bt_node_test_decoration_countlimit_ut_3_node2();
						node2.SetClassNameString("Action");
						node2.SetId(2);
#if !BEHAVIAC_RELEASE
						node2.SetAgentType("AgentNodeTest");
#endif
						node1.AddChild(node2);
						node1.SetHasEvents(node1.HasEvents() | node2.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Action_bt_node_test_decoration_countlimit_ut_3_node3 node3 = new Action_bt_node_test_decoration_countlimit_ut_3_node3();
					node3.SetClassNameString("Action");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node3);
					node0.SetHasEvents(node0.HasEvents() | node3.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/decoration_countlimit_ut_3");
     #if !BEHAVIAC_RELEASE
     bt.SetAgentType("AgentNodeTest");
     #endif
     // children
     {
         Selector node0 = new Selector();
         node0.SetClassNameString("Selector");
         node0.SetId(0);
     #if !BEHAVIAC_RELEASE
         node0.SetAgentType("AgentNodeTest");
     #endif
         bt.AddChild(node0);
         {
             DecoratorCountLimit_bt_node_test_decoration_countlimit_ut_3_node1 node1 = new DecoratorCountLimit_bt_node_test_decoration_countlimit_ut_3_node1();
             node1.SetClassNameString("DecoratorCountLimit");
             node1.SetId(1);
     #if !BEHAVIAC_RELEASE
             node1.SetAgentType("AgentNodeTest");
     #endif
             // attachments
             {
                 Predicate_bt_node_test_decoration_countlimit_ut_3_attach4 attach4 = new Predicate_bt_node_test_decoration_countlimit_ut_3_attach4();
                 attach4.SetClassNameString("Predicate");
                 attach4.SetId(4);
     #if !BEHAVIAC_RELEASE
                 attach4.SetAgentType("AgentNodeTest");
     #endif
                 node1.Attach(attach4);
             }
             {
                 Predicate_bt_node_test_decoration_countlimit_ut_3_attach5 attach5 = new Predicate_bt_node_test_decoration_countlimit_ut_3_attach5();
                 attach5.SetClassNameString("Predicate");
                 attach5.SetId(5);
     #if !BEHAVIAC_RELEASE
                 attach5.SetAgentType("AgentNodeTest");
     #endif
                 node1.Attach(attach5);
             }
             {
                 Predicate_bt_node_test_decoration_countlimit_ut_3_attach6 attach6 = new Predicate_bt_node_test_decoration_countlimit_ut_3_attach6();
                 attach6.SetClassNameString("Predicate");
                 attach6.SetId(6);
     #if !BEHAVIAC_RELEASE
                 attach6.SetAgentType("AgentNodeTest");
     #endif
                 node1.Attach(attach6);
             }
             node0.AddChild(node1);
             {
                 Action_bt_node_test_decoration_countlimit_ut_3_node2 node2 = new Action_bt_node_test_decoration_countlimit_ut_3_node2();
                 node2.SetClassNameString("Action");
                 node2.SetId(2);
     #if !BEHAVIAC_RELEASE
                 node2.SetAgentType("AgentNodeTest");
     #endif
                 node1.AddChild(node2);
                 node1.SetHasEvents(node1.HasEvents() | node2.HasEvents());
             }
             node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
         }
         {
             Action_bt_node_test_decoration_countlimit_ut_3_node3 node3 = new Action_bt_node_test_decoration_countlimit_ut_3_node3();
             node3.SetClassNameString("Action");
             node3.SetId(3);
     #if !BEHAVIAC_RELEASE
             node3.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node3);
             node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
         }
         bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
     }
     return true;
 }