コード例 #1
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/selector_ut_4");
			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);
				{
					Action_bt_node_test_selector_ut_4_node1 node1 = new Action_bt_node_test_selector_ut_4_node1();
					node1.SetClassNameString("Action");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node1);
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Action_bt_node_test_selector_ut_4_node2 node2 = new Action_bt_node_test_selector_ut_4_node2();
					node2.SetClassNameString("Action");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node2);
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Action_bt_node_test_selector_ut_4_node3 node3 = new Action_bt_node_test_selector_ut_4_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;
		}
コード例 #2
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/PreconditionEffectorTest/PreconditionEffectorTest_0");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("PreconEffectorAgent");
#endif
			// children
			{
				Selector node3 = new Selector();
				node3.SetClassNameString("Selector");
				node3.SetId(3);
#if !BEHAVIAC_RELEASE
				node3.SetAgentType("PreconEffectorAgent");
#endif
				// attachments
				{
					Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach0 attach0 = new Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach0();
					attach0.SetClassNameString("Precondition");
					attach0.SetId(0);
#if !BEHAVIAC_RELEASE
					attach0.SetAgentType("PreconEffectorAgent");
#endif
					node3.Attach(attach0, true, false, false);
				}
				bt.AddChild(node3);
				{
					Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_node8 node8 = new Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_node8();
					node8.SetClassNameString("Action");
					node8.SetId(8);
#if !BEHAVIAC_RELEASE
					node8.SetAgentType("PreconEffectorAgent");
#endif
					// attachments
					{
						Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach1 attach1 = new Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach1();
						attach1.SetClassNameString("Precondition");
						attach1.SetId(1);
#if !BEHAVIAC_RELEASE
						attach1.SetAgentType("PreconEffectorAgent");
#endif
						node8.Attach(attach1, true, false, false);
					}
					{
						Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach2 attach2 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach2();
						attach2.SetClassNameString("Effector");
						attach2.SetId(2);
#if !BEHAVIAC_RELEASE
						attach2.SetAgentType("PreconEffectorAgent");
#endif
						node8.Attach(attach2, false, true, false);
					}
					{
						Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach4 attach4 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach4();
						attach4.SetClassNameString("Effector");
						attach4.SetId(4);
#if !BEHAVIAC_RELEASE
						attach4.SetAgentType("PreconEffectorAgent");
#endif
						node8.Attach(attach4, false, true, false);
					}
					node3.AddChild(node8);
					node3.SetHasEvents(node3.HasEvents() | node8.HasEvents());
				}
				{
					Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_node9 node9 = new Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_node9();
					node9.SetClassNameString("Action");
					node9.SetId(9);
#if !BEHAVIAC_RELEASE
					node9.SetAgentType("PreconEffectorAgent");
#endif
					// attachments
					{
						Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach10 attach10 = new Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach10();
						attach10.SetClassNameString("Precondition");
						attach10.SetId(10);
#if !BEHAVIAC_RELEASE
						attach10.SetAgentType("PreconEffectorAgent");
#endif
						node9.Attach(attach10, true, false, false);
					}
					{
						Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach5 attach5 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach5();
						attach5.SetClassNameString("Effector");
						attach5.SetId(5);
#if !BEHAVIAC_RELEASE
						attach5.SetAgentType("PreconEffectorAgent");
#endif
						node9.Attach(attach5, false, true, false);
					}
					{
						Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach6 attach6 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach6();
						attach6.SetClassNameString("Effector");
						attach6.SetId(6);
#if !BEHAVIAC_RELEASE
						attach6.SetAgentType("PreconEffectorAgent");
#endif
						node9.Attach(attach6, false, true, false);
					}
					node3.AddChild(node9);
					node3.SetHasEvents(node3.HasEvents() | node9.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node3.HasEvents());
			}
			return true;
		}
コード例 #3
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/predicate_sequence_ut_5");
			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);
				{
					DecoratorNot_bt_node_test_predicate_sequence_ut_5_node1 node1 = new DecoratorNot_bt_node_test_predicate_sequence_ut_5_node1();
					node1.SetClassNameString("DecoratorNot");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					node0.SetCustomCondition(node1);
					{
						Sequence node3 = new Sequence();
						node3.SetClassNameString("Sequence");
						node3.SetId(3);
#if !BEHAVIAC_RELEASE
						node3.SetAgentType("AgentNodeTest");
#endif
						node1.AddChild(node3);
						{
							Selector node6 = new Selector();
							node6.SetClassNameString("Selector");
							node6.SetId(6);
#if !BEHAVIAC_RELEASE
							node6.SetAgentType("AgentNodeTest");
#endif
							node3.AddChild(node6);
							{
								Condition_bt_node_test_predicate_sequence_ut_5_node8 node8 = new Condition_bt_node_test_predicate_sequence_ut_5_node8();
								node8.SetClassNameString("Condition");
								node8.SetId(8);
#if !BEHAVIAC_RELEASE
								node8.SetAgentType("AgentNodeTest");
#endif
								node6.AddChild(node8);
								node6.SetHasEvents(node6.HasEvents() | node8.HasEvents());
							}
							{
								Condition_bt_node_test_predicate_sequence_ut_5_node9 node9 = new Condition_bt_node_test_predicate_sequence_ut_5_node9();
								node9.SetClassNameString("Condition");
								node9.SetId(9);
#if !BEHAVIAC_RELEASE
								node9.SetAgentType("AgentNodeTest");
#endif
								node6.AddChild(node9);
								node6.SetHasEvents(node6.HasEvents() | node9.HasEvents());
							}
							node3.SetHasEvents(node3.HasEvents() | node6.HasEvents());
						}
						{
							Condition_bt_node_test_predicate_sequence_ut_5_node10 node10 = new Condition_bt_node_test_predicate_sequence_ut_5_node10();
							node10.SetClassNameString("Condition");
							node10.SetId(10);
#if !BEHAVIAC_RELEASE
							node10.SetAgentType("AgentNodeTest");
#endif
							node3.AddChild(node10);
							node3.SetHasEvents(node3.HasEvents() | node10.HasEvents());
						}
						node1.SetHasEvents(node1.HasEvents() | node3.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Action_bt_node_test_predicate_sequence_ut_5_node5 node5 = new Action_bt_node_test_predicate_sequence_ut_5_node5();
					node5.SetClassNameString("Action");
					node5.SetId(5);
#if !BEHAVIAC_RELEASE
					node5.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node5);
					node0.SetHasEvents(node0.HasEvents() | node5.HasEvents());
				}
				{
					Action_bt_node_test_predicate_sequence_ut_5_node4 node4 = new Action_bt_node_test_predicate_sequence_ut_5_node4();
					node4.SetClassNameString("Action");
					node4.SetId(4);
#if !BEHAVIAC_RELEASE
					node4.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node4);
					node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
				}
				{
					Action_bt_node_test_predicate_sequence_ut_5_node2 node2 = new Action_bt_node_test_predicate_sequence_ut_5_node2();
					node2.SetClassNameString("Action");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node2);
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Action_bt_node_test_predicate_sequence_ut_5_node7 node7 = new Action_bt_node_test_predicate_sequence_ut_5_node7();
					node7.SetClassNameString("Action");
					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;
		}
コード例 #4
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/selector_loop_ut_8");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// children
			{
				Sequence node15 = new Sequence();
				node15.SetClassNameString("Sequence");
				node15.SetId(15);
#if !BEHAVIAC_RELEASE
				node15.SetAgentType("AgentNodeTest");
#endif
				bt.AddChild(node15);
				{
					Action_bt_node_test_selector_loop_ut_8_node16 node16 = new Action_bt_node_test_selector_loop_ut_8_node16();
					node16.SetClassNameString("Action");
					node16.SetId(16);
#if !BEHAVIAC_RELEASE
					node16.SetAgentType("AgentNodeTest");
#endif
					node15.AddChild(node16);
					node15.SetHasEvents(node15.HasEvents() | node16.HasEvents());
				}
				{
					Assignment_bt_node_test_selector_loop_ut_8_node21 node21 = new Assignment_bt_node_test_selector_loop_ut_8_node21();
					node21.SetClassNameString("Assignment");
					node21.SetId(21);
#if !BEHAVIAC_RELEASE
					node21.SetAgentType("AgentNodeTest");
#endif
					node15.AddChild(node21);
					node15.SetHasEvents(node15.HasEvents() | node21.HasEvents());
				}
				{
					Selector node23 = new Selector();
					node23.SetClassNameString("Selector");
					node23.SetId(23);
#if !BEHAVIAC_RELEASE
					node23.SetAgentType("AgentNodeTest");
#endif
					node15.AddChild(node23);
					{
						Selector node10 = new Selector();
						node10.SetClassNameString("Selector");
						node10.SetId(10);
#if !BEHAVIAC_RELEASE
						node10.SetAgentType("AgentNodeTest");
#endif
						// attachments
						{
							Precondition_bt_node_test_selector_loop_ut_8_attach24 attach24 = new Precondition_bt_node_test_selector_loop_ut_8_attach24();
							attach24.SetClassNameString("Precondition");
							attach24.SetId(24);
#if !BEHAVIAC_RELEASE
							attach24.SetAgentType("AgentNodeTest");
#endif
							node10.Attach(attach24, true, false, false);
						}
						node23.AddChild(node10);
						{
							DecoratorLoop_bt_node_test_selector_loop_ut_8_node9 node9 = new DecoratorLoop_bt_node_test_selector_loop_ut_8_node9();
							node9.SetClassNameString("DecoratorLoop");
							node9.SetId(9);
#if !BEHAVIAC_RELEASE
							node9.SetAgentType("AgentNodeTest");
#endif
							// attachments
							{
								Precondition_bt_node_test_selector_loop_ut_8_attach14 attach14 = new Precondition_bt_node_test_selector_loop_ut_8_attach14();
								attach14.SetClassNameString("Precondition");
								attach14.SetId(14);
#if !BEHAVIAC_RELEASE
								attach14.SetAgentType("AgentNodeTest");
#endif
								node9.Attach(attach14, true, false, false);
							}
							{
								Precondition_bt_node_test_selector_loop_ut_8_attach17 attach17 = new Precondition_bt_node_test_selector_loop_ut_8_attach17();
								attach17.SetClassNameString("Precondition");
								attach17.SetId(17);
#if !BEHAVIAC_RELEASE
								attach17.SetAgentType("AgentNodeTest");
#endif
								node9.Attach(attach17, true, false, false);
							}
							{
								Effector_bt_node_test_selector_loop_ut_8_attach18 attach18 = new Effector_bt_node_test_selector_loop_ut_8_attach18();
								attach18.SetClassNameString("Effector");
								attach18.SetId(18);
#if !BEHAVIAC_RELEASE
								attach18.SetAgentType("AgentNodeTest");
#endif
								node9.Attach(attach18, false, true, false);
							}
							node10.AddChild(node9);
							{
								SelectorLoop node0 = new SelectorLoop();
								node0.SetClassNameString("SelectorLoop");
								node0.SetId(0);
#if !BEHAVIAC_RELEASE
								node0.SetAgentType("AgentNodeTest");
#endif
								node9.AddChild(node0);
								{
									WithPrecondition node1 = new WithPrecondition();
									node1.SetClassNameString("WithPrecondition");
									node1.SetId(1);
#if !BEHAVIAC_RELEASE
									node1.SetAgentType("AgentNodeTest");
#endif
									node0.AddChild(node1);
									{
										Condition_bt_node_test_selector_loop_ut_8_node4 node4 = new Condition_bt_node_test_selector_loop_ut_8_node4();
										node4.SetClassNameString("Condition");
										node4.SetId(4);
#if !BEHAVIAC_RELEASE
										node4.SetAgentType("AgentNodeTest");
#endif
										node1.AddChild(node4);
										node1.SetHasEvents(node1.HasEvents() | node4.HasEvents());
									}
									{
										Action_bt_node_test_selector_loop_ut_8_node5 node5 = new Action_bt_node_test_selector_loop_ut_8_node5();
										node5.SetClassNameString("Action");
										node5.SetId(5);
#if !BEHAVIAC_RELEASE
										node5.SetAgentType("AgentNodeTest");
#endif
										// attachments
										{
											Precondition_bt_node_test_selector_loop_ut_8_attach7 attach7 = new Precondition_bt_node_test_selector_loop_ut_8_attach7();
											attach7.SetClassNameString("Precondition");
											attach7.SetId(7);
#if !BEHAVIAC_RELEASE
											attach7.SetAgentType("AgentNodeTest");
#endif
											node5.Attach(attach7, true, false, false);
										}
										node1.AddChild(node5);
										node1.SetHasEvents(node1.HasEvents() | node5.HasEvents());
									}
									node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
								}
								{
									WithPrecondition node2 = new WithPrecondition();
									node2.SetClassNameString("WithPrecondition");
									node2.SetId(2);
#if !BEHAVIAC_RELEASE
									node2.SetAgentType("AgentNodeTest");
#endif
									node0.AddChild(node2);
									{
										True node3 = new True();
										node3.SetClassNameString("True");
										node3.SetId(3);
#if !BEHAVIAC_RELEASE
										node3.SetAgentType("AgentNodeTest");
#endif
										node2.AddChild(node3);
										node2.SetHasEvents(node2.HasEvents() | node3.HasEvents());
									}
									{
										Action_bt_node_test_selector_loop_ut_8_node6 node6 = new Action_bt_node_test_selector_loop_ut_8_node6();
										node6.SetClassNameString("Action");
										node6.SetId(6);
#if !BEHAVIAC_RELEASE
										node6.SetAgentType("AgentNodeTest");
#endif
										// attachments
										{
											Precondition_bt_node_test_selector_loop_ut_8_attach8 attach8 = new Precondition_bt_node_test_selector_loop_ut_8_attach8();
											attach8.SetClassNameString("Precondition");
											attach8.SetId(8);
#if !BEHAVIAC_RELEASE
											attach8.SetAgentType("AgentNodeTest");
#endif
											node6.Attach(attach8, true, false, false);
										}
										node2.AddChild(node6);
										node2.SetHasEvents(node2.HasEvents() | node6.HasEvents());
									}
									node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
								}
								node9.SetHasEvents(node9.HasEvents() | node0.HasEvents());
							}
							node10.SetHasEvents(node10.HasEvents() | node9.HasEvents());
						}
						{
							Sequence node11 = new Sequence();
							node11.SetClassNameString("Sequence");
							node11.SetId(11);
#if !BEHAVIAC_RELEASE
							node11.SetAgentType("AgentNodeTest");
#endif
							// attachments
							{
								Precondition_bt_node_test_selector_loop_ut_8_attach19 attach19 = new Precondition_bt_node_test_selector_loop_ut_8_attach19();
								attach19.SetClassNameString("Precondition");
								attach19.SetId(19);
#if !BEHAVIAC_RELEASE
								attach19.SetAgentType("AgentNodeTest");
#endif
								node11.Attach(attach19, true, false, false);
							}
							node10.AddChild(node11);
							{
								Action_bt_node_test_selector_loop_ut_8_node12 node12 = new Action_bt_node_test_selector_loop_ut_8_node12();
								node12.SetClassNameString("Action");
								node12.SetId(12);
#if !BEHAVIAC_RELEASE
								node12.SetAgentType("AgentNodeTest");
#endif
								// attachments
								{
									Precondition_bt_node_test_selector_loop_ut_8_attach20 attach20 = new Precondition_bt_node_test_selector_loop_ut_8_attach20();
									attach20.SetClassNameString("Precondition");
									attach20.SetId(20);
#if !BEHAVIAC_RELEASE
									attach20.SetAgentType("AgentNodeTest");
#endif
									node12.Attach(attach20, true, false, false);
								}
								node11.AddChild(node12);
								node11.SetHasEvents(node11.HasEvents() | node12.HasEvents());
							}
							{
								Action_bt_node_test_selector_loop_ut_8_node13 node13 = new Action_bt_node_test_selector_loop_ut_8_node13();
								node13.SetClassNameString("Action");
								node13.SetId(13);
#if !BEHAVIAC_RELEASE
								node13.SetAgentType("AgentNodeTest");
#endif
								// attachments
								{
									Precondition_bt_node_test_selector_loop_ut_8_attach22 attach22 = new Precondition_bt_node_test_selector_loop_ut_8_attach22();
									attach22.SetClassNameString("Precondition");
									attach22.SetId(22);
#if !BEHAVIAC_RELEASE
									attach22.SetAgentType("AgentNodeTest");
#endif
									node13.Attach(attach22, true, false, false);
								}
								node11.AddChild(node13);
								node11.SetHasEvents(node11.HasEvents() | node13.HasEvents());
							}
							node10.SetHasEvents(node10.HasEvents() | node11.HasEvents());
						}
						node23.SetHasEvents(node23.HasEvents() | node10.HasEvents());
					}
					{
						Assignment_bt_node_test_selector_loop_ut_8_node25 node25 = new Assignment_bt_node_test_selector_loop_ut_8_node25();
						node25.SetClassNameString("Assignment");
						node25.SetId(25);
#if !BEHAVIAC_RELEASE
						node25.SetAgentType("AgentNodeTest");
#endif
						node23.AddChild(node25);
						node23.SetHasEvents(node23.HasEvents() | node25.HasEvents());
					}
					node15.SetHasEvents(node15.HasEvents() | node23.HasEvents());
				}
				{
					Compute_bt_node_test_selector_loop_ut_8_node26 node26 = new Compute_bt_node_test_selector_loop_ut_8_node26();
					node26.SetClassNameString("Compute");
					node26.SetId(26);
#if !BEHAVIAC_RELEASE
					node26.SetAgentType("AgentNodeTest");
#endif
					node15.AddChild(node26);
					node15.SetHasEvents(node15.HasEvents() | node26.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node15.HasEvents());
			}
			return true;
		}
コード例 #5
0
ファイル: generated_behaviors.cs プロジェクト: nusus/behaviac
 public static bool build_behavior_tree(BehaviorTree bt)
 {
     bt.SetClassNameString("BehaviorTree");
     bt.SetId(-1);
     bt.SetName("node_test/predicate_selector_ut_5");
     #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
         // attachments
         {
             Predicate_bt_node_test_predicate_selector_ut_5_attach1 attach1 = new Predicate_bt_node_test_predicate_selector_ut_5_attach1();
             attach1.SetClassNameString("Predicate");
             attach1.SetId(1);
     #if !BEHAVIAC_RELEASE
             attach1.SetAgentType("AgentNodeTest");
     #endif
             node0.Attach(attach1);
         }
         {
             Predicate_bt_node_test_predicate_selector_ut_5_attach3 attach3 = new Predicate_bt_node_test_predicate_selector_ut_5_attach3();
             attach3.SetClassNameString("Predicate");
             attach3.SetId(3);
     #if !BEHAVIAC_RELEASE
             attach3.SetAgentType("AgentNodeTest");
     #endif
             node0.Attach(attach3);
         }
         {
             Predicate_bt_node_test_predicate_selector_ut_5_attach6 attach6 = new Predicate_bt_node_test_predicate_selector_ut_5_attach6();
             attach6.SetClassNameString("Predicate");
             attach6.SetId(6);
     #if !BEHAVIAC_RELEASE
             attach6.SetAgentType("AgentNodeTest");
     #endif
             node0.Attach(attach6);
         }
         bt.AddChild(node0);
         {
             Action_bt_node_test_predicate_selector_ut_5_node5 node5 = new Action_bt_node_test_predicate_selector_ut_5_node5();
             node5.SetClassNameString("Action");
             node5.SetId(5);
     #if !BEHAVIAC_RELEASE
             node5.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node5);
             node0.SetHasEvents(node0.HasEvents() | node5.HasEvents());
         }
         {
             Action_bt_node_test_predicate_selector_ut_5_node4 node4 = new Action_bt_node_test_predicate_selector_ut_5_node4();
             node4.SetClassNameString("Action");
             node4.SetId(4);
     #if !BEHAVIAC_RELEASE
             node4.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node4);
             node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
         }
         {
             Action_bt_node_test_predicate_selector_ut_5_node2 node2 = new Action_bt_node_test_predicate_selector_ut_5_node2();
             node2.SetClassNameString("Action");
             node2.SetId(2);
     #if !BEHAVIAC_RELEASE
             node2.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node2);
             node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
         }
         {
             Action_bt_node_test_predicate_selector_ut_5_node7 node7 = new Action_bt_node_test_predicate_selector_ut_5_node7();
             node7.SetClassNameString("Action");
             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;
 }
コード例 #6
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/enter_exit_action_ut_0");
			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
				// attachments
				{
					Precondition_bt_node_test_enter_exit_action_ut_0_attach1 attach1 = new Precondition_bt_node_test_enter_exit_action_ut_0_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_0_attach2 attach2 = new Effector_bt_node_test_enter_exit_action_ut_0_attach2();
					attach2.SetClassNameString("Effector");
					attach2.SetId(2);
#if !BEHAVIAC_RELEASE
					attach2.SetAgentType("AgentNodeTest");
#endif
					node0.Attach(attach2, false, true, false);
				}
				bt.AddChild(node0);
				{
					Selector node6 = new Selector();
					node6.SetClassNameString("Selector");
					node6.SetId(6);
#if !BEHAVIAC_RELEASE
					node6.SetAgentType("AgentNodeTest");
#endif
					// attachments
					{
						Precondition_bt_node_test_enter_exit_action_ut_0_attach3 attach3 = new Precondition_bt_node_test_enter_exit_action_ut_0_attach3();
						attach3.SetClassNameString("Precondition");
						attach3.SetId(3);
#if !BEHAVIAC_RELEASE
						attach3.SetAgentType("AgentNodeTest");
#endif
						node6.Attach(attach3, true, false, false);
					}
					{
						Effector_bt_node_test_enter_exit_action_ut_0_attach4 attach4 = new Effector_bt_node_test_enter_exit_action_ut_0_attach4();
						attach4.SetClassNameString("Effector");
						attach4.SetId(4);
#if !BEHAVIAC_RELEASE
						attach4.SetAgentType("AgentNodeTest");
#endif
						node6.Attach(attach4, false, true, false);
					}
					node0.AddChild(node6);
					{
						WaitforSignal node7 = new WaitforSignal();
						node7.SetClassNameString("WaitforSignal");
						node7.SetId(7);
#if !BEHAVIAC_RELEASE
						node7.SetAgentType("AgentNodeTest");
#endif
						node6.AddChild(node7);
						{
							Condition_bt_node_test_enter_exit_action_ut_0_node5 node5 = new Condition_bt_node_test_enter_exit_action_ut_0_node5();
							node5.SetClassNameString("Condition");
							node5.SetId(5);
#if !BEHAVIAC_RELEASE
							node5.SetAgentType("AgentNodeTest");
#endif
							node7.SetCustomCondition(node5);
							node7.SetHasEvents(node7.HasEvents() | node5.HasEvents());
						}
						node6.SetHasEvents(node6.HasEvents() | node7.HasEvents());
					}
					{
						True node8 = new True();
						node8.SetClassNameString("True");
						node8.SetId(8);
#if !BEHAVIAC_RELEASE
						node8.SetAgentType("AgentNodeTest");
#endif
						node6.AddChild(node8);
						node6.SetHasEvents(node6.HasEvents() | node8.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node6.HasEvents());
				}
				{
					True node9 = new True();
					node9.SetClassNameString("True");
					node9.SetId(9);
#if !BEHAVIAC_RELEASE
					node9.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node9);
					node0.SetHasEvents(node0.HasEvents() | node9.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
コード例 #7
0
 public static bool build_behavior_tree(BehaviorTree bt)
 {
     bt.SetClassNameString("BehaviorTree");
     bt.SetId(-1);
     bt.SetName("Tank_Take_Award_Destroy_Enemy");
     #if !BEHAVIAC_RELEASE
     bt.SetAgentType("Player");
     #endif
     // pars
     bt.AddPar("UnityEngine.Vector3", "parT_enemyPosition", "{kEpsilon=0;x=0;y=0;z=0;}", "");
     bt.AddPar("behaviac.Agent", "parT_nearestEnemy", "null", "");
     bt.AddPar("int", "parT_PathFindLevel", "0", "");
     bt.AddPar("UnityEngine.Vector3", "parT_NavTargetPosition", "{kEpsilon=0;x=0;y=0;z=0;}", "");
     bt.AddPar("int", "parT_AwardID", "0", "");
     // children
     {
         DecoratorAlwaysRunning_bt_Tank_Take_Award_Destroy_Enemy_node10 node10 = new DecoratorAlwaysRunning_bt_Tank_Take_Award_Destroy_Enemy_node10();
         node10.SetClassNameString("DecoratorAlwaysRunning");
         node10.SetId(10);
     #if !BEHAVIAC_RELEASE
         node10.SetAgentType("Player");
     #endif
         bt.AddChild(node10);
         {
             Selector node11 = new Selector();
             node11.SetClassNameString("Selector");
             node11.SetId(11);
     #if !BEHAVIAC_RELEASE
             node11.SetAgentType("Player");
     #endif
             node10.AddChild(node11);
             {
                 Sequence node17 = new Sequence();
                 node17.SetClassNameString("Sequence");
                 node17.SetId(17);
     #if !BEHAVIAC_RELEASE
                 node17.SetAgentType("Player");
     #endif
                 node11.AddChild(node17);
                 {
                     Assignment_bt_Tank_Take_Award_Destroy_Enemy_node18 node18 = new Assignment_bt_Tank_Take_Award_Destroy_Enemy_node18();
                     node18.SetClassNameString("Assignment");
                     node18.SetId(18);
     #if !BEHAVIAC_RELEASE
                     node18.SetAgentType("Player");
     #endif
                     node17.AddChild(node18);
                     node17.SetHasEvents(node17.HasEvents() | node18.HasEvents());
                 }
                 {
                     Condition_bt_Tank_Take_Award_Destroy_Enemy_node19 node19 = new Condition_bt_Tank_Take_Award_Destroy_Enemy_node19();
                     node19.SetClassNameString("Condition");
                     node19.SetId(19);
     #if !BEHAVIAC_RELEASE
                     node19.SetAgentType("Player");
     #endif
                     node17.AddChild(node19);
                     node17.SetHasEvents(node17.HasEvents() | node19.HasEvents());
                 }
                 {
                     Assignment_bt_Tank_Take_Award_Destroy_Enemy_node20 node20 = new Assignment_bt_Tank_Take_Award_Destroy_Enemy_node20();
                     node20.SetClassNameString("Assignment");
                     node20.SetId(20);
     #if !BEHAVIAC_RELEASE
                     node20.SetAgentType("Player");
     #endif
                     node17.AddChild(node20);
                     node17.SetHasEvents(node17.HasEvents() | node20.HasEvents());
                 }
                 {
                     IfElse node13 = new IfElse();
                     node13.SetClassNameString("IfElse");
                     node13.SetId(13);
     #if !BEHAVIAC_RELEASE
                     node13.SetAgentType("Player");
     #endif
                     node17.AddChild(node13);
                     {
                         Condition_bt_Tank_Take_Award_Destroy_Enemy_node14 node14 = new Condition_bt_Tank_Take_Award_Destroy_Enemy_node14();
                         node14.SetClassNameString("Condition");
                         node14.SetId(14);
     #if !BEHAVIAC_RELEASE
                         node14.SetAgentType("Player");
     #endif
                         node13.AddChild(node14);
                         node13.SetHasEvents(node13.HasEvents() | node14.HasEvents());
                     }
                     {
                         Assignment_bt_Tank_Take_Award_Destroy_Enemy_node15 node15 = new Assignment_bt_Tank_Take_Award_Destroy_Enemy_node15();
                         node15.SetClassNameString("Assignment");
                         node15.SetId(15);
     #if !BEHAVIAC_RELEASE
                         node15.SetAgentType("Player");
     #endif
                         node13.AddChild(node15);
                         node13.SetHasEvents(node13.HasEvents() | node15.HasEvents());
                     }
                     {
                         Assignment_bt_Tank_Take_Award_Destroy_Enemy_node16 node16 = new Assignment_bt_Tank_Take_Award_Destroy_Enemy_node16();
                         node16.SetClassNameString("Assignment");
                         node16.SetId(16);
     #if !BEHAVIAC_RELEASE
                         node16.SetAgentType("Player");
     #endif
                         node13.AddChild(node16);
                         node13.SetHasEvents(node13.HasEvents() | node16.HasEvents());
                     }
                     node17.SetHasEvents(node17.HasEvents() | node13.HasEvents());
                 }
                 {
                     Action_bt_Tank_Take_Award_Destroy_Enemy_node8 node8 = new Action_bt_Tank_Take_Award_Destroy_Enemy_node8();
                     node8.SetClassNameString("Action");
                     node8.SetId(8);
     #if !BEHAVIAC_RELEASE
                     node8.SetAgentType("Player");
     #endif
                     node17.AddChild(node8);
                     node17.SetHasEvents(node17.HasEvents() | node8.HasEvents());
                 }
                 {
                     Action_bt_Tank_Take_Award_Destroy_Enemy_node29 node29 = new Action_bt_Tank_Take_Award_Destroy_Enemy_node29();
                     node29.SetClassNameString("Action");
                     node29.SetId(29);
     #if !BEHAVIAC_RELEASE
                     node29.SetAgentType("Player");
     #endif
                     node17.AddChild(node29);
                     node17.SetHasEvents(node17.HasEvents() | node29.HasEvents());
                 }
                 node11.SetHasEvents(node11.HasEvents() | node17.HasEvents());
             }
             {
                 Sequence node27 = new Sequence();
                 node27.SetClassNameString("Sequence");
                 node27.SetId(27);
     #if !BEHAVIAC_RELEASE
                 node27.SetAgentType("Player");
     #endif
                 node11.AddChild(node27);
                 {
                     Assignment_bt_Tank_Take_Award_Destroy_Enemy_node28 node28 = new Assignment_bt_Tank_Take_Award_Destroy_Enemy_node28();
                     node28.SetClassNameString("Assignment");
                     node28.SetId(28);
     #if !BEHAVIAC_RELEASE
                     node28.SetAgentType("Player");
     #endif
                     node27.AddChild(node28);
                     node27.SetHasEvents(node27.HasEvents() | node28.HasEvents());
                 }
                 {
                     Condition_bt_Tank_Take_Award_Destroy_Enemy_node34 node34 = new Condition_bt_Tank_Take_Award_Destroy_Enemy_node34();
                     node34.SetClassNameString("Condition");
                     node34.SetId(34);
     #if !BEHAVIAC_RELEASE
                     node34.SetAgentType("Player");
     #endif
                     node27.AddChild(node34);
                     node27.SetHasEvents(node27.HasEvents() | node34.HasEvents());
                 }
                 {
                     Assignment_bt_Tank_Take_Award_Destroy_Enemy_node37 node37 = new Assignment_bt_Tank_Take_Award_Destroy_Enemy_node37();
                     node37.SetClassNameString("Assignment");
                     node37.SetId(37);
     #if !BEHAVIAC_RELEASE
                     node37.SetAgentType("Player");
     #endif
                     node27.AddChild(node37);
                     node27.SetHasEvents(node27.HasEvents() | node37.HasEvents());
                 }
                 {
                     IfElse node23 = new IfElse();
                     node23.SetClassNameString("IfElse");
                     node23.SetId(23);
     #if !BEHAVIAC_RELEASE
                     node23.SetAgentType("Player");
     #endif
                     node27.AddChild(node23);
                     {
                         Condition_bt_Tank_Take_Award_Destroy_Enemy_node24 node24 = new Condition_bt_Tank_Take_Award_Destroy_Enemy_node24();
                         node24.SetClassNameString("Condition");
                         node24.SetId(24);
     #if !BEHAVIAC_RELEASE
                         node24.SetAgentType("Player");
     #endif
                         node23.AddChild(node24);
                         node23.SetHasEvents(node23.HasEvents() | node24.HasEvents());
                     }
                     {
                         Assignment_bt_Tank_Take_Award_Destroy_Enemy_node25 node25 = new Assignment_bt_Tank_Take_Award_Destroy_Enemy_node25();
                         node25.SetClassNameString("Assignment");
                         node25.SetId(25);
     #if !BEHAVIAC_RELEASE
                         node25.SetAgentType("Player");
     #endif
                         node23.AddChild(node25);
                         node23.SetHasEvents(node23.HasEvents() | node25.HasEvents());
                     }
                     {
                         Assignment_bt_Tank_Take_Award_Destroy_Enemy_node26 node26 = new Assignment_bt_Tank_Take_Award_Destroy_Enemy_node26();
                         node26.SetClassNameString("Assignment");
                         node26.SetId(26);
     #if !BEHAVIAC_RELEASE
                         node26.SetAgentType("Player");
     #endif
                         node23.AddChild(node26);
                         node23.SetHasEvents(node23.HasEvents() | node26.HasEvents());
                     }
                     node27.SetHasEvents(node27.HasEvents() | node23.HasEvents());
                 }
                 {
                     Action_bt_Tank_Take_Award_Destroy_Enemy_node21 node21 = new Action_bt_Tank_Take_Award_Destroy_Enemy_node21();
                     node21.SetClassNameString("Action");
                     node21.SetId(21);
     #if !BEHAVIAC_RELEASE
                     node21.SetAgentType("Player");
     #endif
                     node27.AddChild(node21);
                     node27.SetHasEvents(node27.HasEvents() | node21.HasEvents());
                 }
                 {
                     Action_bt_Tank_Take_Award_Destroy_Enemy_node30 node30 = new Action_bt_Tank_Take_Award_Destroy_Enemy_node30();
                     node30.SetClassNameString("Action");
                     node30.SetId(30);
     #if !BEHAVIAC_RELEASE
                     node30.SetAgentType("Player");
     #endif
                     node27.AddChild(node30);
                     node27.SetHasEvents(node27.HasEvents() | node30.HasEvents());
                 }
                 node11.SetHasEvents(node11.HasEvents() | node27.HasEvents());
             }
             {
                 Sequence node2 = new Sequence();
                 node2.SetClassNameString("Sequence");
                 node2.SetId(2);
     #if !BEHAVIAC_RELEASE
                 node2.SetAgentType("Player");
     #endif
                 node11.AddChild(node2);
                 {
                     Condition_bt_Tank_Take_Award_Destroy_Enemy_node12 node12 = new Condition_bt_Tank_Take_Award_Destroy_Enemy_node12();
                     node12.SetClassNameString("Condition");
                     node12.SetId(12);
     #if !BEHAVIAC_RELEASE
                     node12.SetAgentType("Player");
     #endif
                     node2.AddChild(node12);
                     node2.SetHasEvents(node2.HasEvents() | node12.HasEvents());
                 }
                 {
                     Action_bt_Tank_Take_Award_Destroy_Enemy_node1 node1 = new Action_bt_Tank_Take_Award_Destroy_Enemy_node1();
                     node1.SetClassNameString("Action");
                     node1.SetId(1);
     #if !BEHAVIAC_RELEASE
                     node1.SetAgentType("Player");
     #endif
                     node2.AddChild(node1);
                     node2.SetHasEvents(node2.HasEvents() | node1.HasEvents());
                 }
                 {
                     Action_bt_Tank_Take_Award_Destroy_Enemy_node3 node3 = new Action_bt_Tank_Take_Award_Destroy_Enemy_node3();
                     node3.SetClassNameString("Action");
                     node3.SetId(3);
     #if !BEHAVIAC_RELEASE
                     node3.SetAgentType("Player");
     #endif
                     node2.AddChild(node3);
                     node2.SetHasEvents(node2.HasEvents() | node3.HasEvents());
                 }
                 {
                     Action_bt_Tank_Take_Award_Destroy_Enemy_node4 node4 = new Action_bt_Tank_Take_Award_Destroy_Enemy_node4();
                     node4.SetClassNameString("Action");
                     node4.SetId(4);
     #if !BEHAVIAC_RELEASE
                     node4.SetAgentType("Player");
     #endif
                     node2.AddChild(node4);
                     node2.SetHasEvents(node2.HasEvents() | node4.HasEvents());
                 }
                 node11.SetHasEvents(node11.HasEvents() | node2.HasEvents());
             }
             node10.SetHasEvents(node10.HasEvents() | node11.HasEvents());
         }
         bt.SetHasEvents(bt.HasEvents() | node10.HasEvents());
     }
     return true;
 }
コード例 #8
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/decoration_countlimit_ut_2");
			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_2_node1 node1 = new DecoratorCountLimit_bt_node_test_decoration_countlimit_ut_2_node1();
					node1.SetClassNameString("DecoratorCountLimit");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node1);
					{
						And node4 = new And();
						node4.SetClassNameString("And");
						node4.SetId(4);
#if !BEHAVIAC_RELEASE
						node4.SetAgentType("AgentNodeTest");
#endif
						node1.SetCustomCondition(node4);
						{
							Condition_bt_node_test_decoration_countlimit_ut_2_node5 node5 = new Condition_bt_node_test_decoration_countlimit_ut_2_node5();
							node5.SetClassNameString("Condition");
							node5.SetId(5);
#if !BEHAVIAC_RELEASE
							node5.SetAgentType("AgentNodeTest");
#endif
							node4.AddChild(node5);
							node4.SetHasEvents(node4.HasEvents() | node5.HasEvents());
						}
						{
							Condition_bt_node_test_decoration_countlimit_ut_2_node6 node6 = new Condition_bt_node_test_decoration_countlimit_ut_2_node6();
							node6.SetClassNameString("Condition");
							node6.SetId(6);
#if !BEHAVIAC_RELEASE
							node6.SetAgentType("AgentNodeTest");
#endif
							node4.AddChild(node6);
							node4.SetHasEvents(node4.HasEvents() | node6.HasEvents());
						}
						node1.SetHasEvents(node1.HasEvents() | node4.HasEvents());
					}
					{
						Action_bt_node_test_decoration_countlimit_ut_2_node2 node2 = new Action_bt_node_test_decoration_countlimit_ut_2_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_2_node3 node3 = new Action_bt_node_test_decoration_countlimit_ut_2_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;
		}
コード例 #9
0
 public static bool build_behavior_tree(BehaviorTree bt)
 {
     bt.SetClassNameString("BehaviorTree");
     bt.SetId(-1);
     bt.SetName("Tank_Agressive");
     #if !BEHAVIAC_RELEASE
     bt.SetAgentType("Player");
     #endif
     // pars
     bt.AddPar("UnityEngine.Vector3", "parT_NavTargetPosition", "{kEpsilon=0;x=0;y=0;z=0;}", "");
     bt.AddPar("Player", "parIn_Self", "null", "");
     bt.AddPar("float", "parT_RotateAngle", "0", "");
     bt.AddPar("behaviac.Agent", "parT_nearestEnemy", "null", "");
     bt.AddPar("UnityEngine.Vector3", "parT_enemyPosition", "{kEpsilon=0;x=0;y=0;z=0;}", "");
     bt.AddPar("eMapDirection", "parT_TendencyDirection", "UNKNOWN", "");
     bt.AddPar("bool", "parT_CanReachToAward", "false", "");
     bt.AddPar("int", "parT_AwardID", "0", "");
     bt.AddPar("float", "parT_EnemyAzimuth_0", "0", "");
     bt.AddPar("eMapDirection", "parT_SafeMoveDirection", "UNKNOWN", "");
     bt.AddPar("eMapDirection", "parT_RandomMoveDirection", "UNKNOWN", "");
     bt.AddPar("bool", "parT_NavFailed", "false", "");
     bt.AddPar("float", "parT_EnemyAzimuth", "0", "");
     // children
     {
         DecoratorLoop_bt_Tank_Agressive_node2 node2 = new DecoratorLoop_bt_Tank_Agressive_node2();
         node2.SetClassNameString("DecoratorLoop");
         node2.SetId(2);
     #if !BEHAVIAC_RELEASE
         node2.SetAgentType("Player");
     #endif
         bt.AddChild(node2);
         {
             Parallel_bt_Tank_Agressive_node0 node0 = new Parallel_bt_Tank_Agressive_node0();
             node0.SetClassNameString("Parallel");
             node0.SetId(0);
     #if !BEHAVIAC_RELEASE
             node0.SetAgentType("Player");
     #endif
             node2.AddChild(node0);
             {
                 DecoratorAlwaysRunning_bt_Tank_Agressive_node38 node38 = new DecoratorAlwaysRunning_bt_Tank_Agressive_node38();
                 node38.SetClassNameString("DecoratorAlwaysRunning");
                 node38.SetId(38);
     #if !BEHAVIAC_RELEASE
                 node38.SetAgentType("Player");
     #endif
                 node0.AddChild(node38);
                 {
                     Selector node39 = new Selector();
                     node39.SetClassNameString("Selector");
                     node39.SetId(39);
     #if !BEHAVIAC_RELEASE
                     node39.SetAgentType("Player");
     #endif
                     node38.AddChild(node39);
                     {
                         DecoratorAlwaysFailure_bt_Tank_Agressive_node25 node25 = new DecoratorAlwaysFailure_bt_Tank_Agressive_node25();
                         node25.SetClassNameString("DecoratorAlwaysFailure");
                         node25.SetId(25);
     #if !BEHAVIAC_RELEASE
                         node25.SetAgentType("Player");
     #endif
                         node39.AddChild(node25);
                         {
                             Assignment_bt_Tank_Agressive_node26 node26 = new Assignment_bt_Tank_Agressive_node26();
                             node26.SetClassNameString("Assignment");
                             node26.SetId(26);
     #if !BEHAVIAC_RELEASE
                             node26.SetAgentType("Player");
     #endif
                             node25.AddChild(node26);
                             node25.SetHasEvents(node25.HasEvents() | node26.HasEvents());
                         }
                         node39.SetHasEvents(node39.HasEvents() | node25.HasEvents());
                     }
                     {
                         Sequence node22 = new Sequence();
                         node22.SetClassNameString("Sequence");
                         node22.SetId(22);
     #if !BEHAVIAC_RELEASE
                         node22.SetAgentType("Player");
     #endif
                         node39.AddChild(node22);
                         {
                             Assignment_bt_Tank_Agressive_node35 node35 = new Assignment_bt_Tank_Agressive_node35();
                             node35.SetClassNameString("Assignment");
                             node35.SetId(35);
     #if !BEHAVIAC_RELEASE
                             node35.SetAgentType("Player");
     #endif
                             node22.AddChild(node35);
                             node22.SetHasEvents(node22.HasEvents() | node35.HasEvents());
                         }
                         {
                             Condition_bt_Tank_Agressive_node34 node34 = new Condition_bt_Tank_Agressive_node34();
                             node34.SetClassNameString("Condition");
                             node34.SetId(34);
     #if !BEHAVIAC_RELEASE
                             node34.SetAgentType("Player");
     #endif
                             node22.AddChild(node34);
                             node22.SetHasEvents(node22.HasEvents() | node34.HasEvents());
                         }
                         {
                             Assignment_bt_Tank_Agressive_node37 node37 = new Assignment_bt_Tank_Agressive_node37();
                             node37.SetClassNameString("Assignment");
                             node37.SetId(37);
     #if !BEHAVIAC_RELEASE
                             node37.SetAgentType("Player");
     #endif
                             node22.AddChild(node37);
                             node22.SetHasEvents(node22.HasEvents() | node37.HasEvents());
                         }
                         {
                             Action_bt_Tank_Agressive_node24 node24 = new Action_bt_Tank_Agressive_node24();
                             node24.SetClassNameString("Action");
                             node24.SetId(24);
     #if !BEHAVIAC_RELEASE
                             node24.SetAgentType("Player");
     #endif
                             node22.AddChild(node24);
                             node22.SetHasEvents(node22.HasEvents() | node24.HasEvents());
                         }
                         {
                             Action_bt_Tank_Agressive_node5 node5 = new Action_bt_Tank_Agressive_node5();
                             node5.SetClassNameString("Action");
                             node5.SetId(5);
     #if !BEHAVIAC_RELEASE
                             node5.SetAgentType("Player");
     #endif
                             node22.AddChild(node5);
                             node22.SetHasEvents(node22.HasEvents() | node5.HasEvents());
                         }
                         node39.SetHasEvents(node39.HasEvents() | node22.HasEvents());
                     }
                     {
                         Parallel_bt_Tank_Agressive_node15 node15 = new Parallel_bt_Tank_Agressive_node15();
                         node15.SetClassNameString("Parallel");
                         node15.SetId(15);
     #if !BEHAVIAC_RELEASE
                         node15.SetAgentType("Player");
     #endif
                         node39.AddChild(node15);
                         {
                             DecoratorNot_bt_Tank_Agressive_node21 node21 = new DecoratorNot_bt_Tank_Agressive_node21();
                             node21.SetClassNameString("DecoratorNot");
                             node21.SetId(21);
     #if !BEHAVIAC_RELEASE
                             node21.SetAgentType("Player");
     #endif
                             node15.AddChild(node21);
                             {
                                 Sequence node8 = new Sequence();
                                 node8.SetClassNameString("Sequence");
                                 node8.SetId(8);
     #if !BEHAVIAC_RELEASE
                                 node8.SetAgentType("Player");
     #endif
                                 node21.AddChild(node8);
                                 {
                                     Wait_bt_Tank_Agressive_node19 node19 = new Wait_bt_Tank_Agressive_node19();
                                     node19.SetClassNameString("Wait");
                                     node19.SetId(19);
     #if !BEHAVIAC_RELEASE
                                     node19.SetAgentType("Player");
     #endif
                                     node8.AddChild(node19);
                                     node8.SetHasEvents(node8.HasEvents() | node19.HasEvents());
                                 }
                                 {
                                     Assignment_bt_Tank_Agressive_node20 node20 = new Assignment_bt_Tank_Agressive_node20();
                                     node20.SetClassNameString("Assignment");
                                     node20.SetId(20);
     #if !BEHAVIAC_RELEASE
                                     node20.SetAgentType("Player");
     #endif
                                     node8.AddChild(node20);
                                     node8.SetHasEvents(node8.HasEvents() | node20.HasEvents());
                                 }
                                 node21.SetHasEvents(node21.HasEvents() | node8.HasEvents());
                             }
                             node15.SetHasEvents(node15.HasEvents() | node21.HasEvents());
                         }
                         {
                             Sequence node3 = new Sequence();
                             node3.SetClassNameString("Sequence");
                             node3.SetId(3);
     #if !BEHAVIAC_RELEASE
                             node3.SetAgentType("Player");
     #endif
                             node15.AddChild(node3);
                             {
                                 Assignment_bt_Tank_Agressive_node4 node4 = new Assignment_bt_Tank_Agressive_node4();
                                 node4.SetClassNameString("Assignment");
                                 node4.SetId(4);
     #if !BEHAVIAC_RELEASE
                                 node4.SetAgentType("Player");
     #endif
                                 node3.AddChild(node4);
                                 node3.SetHasEvents(node3.HasEvents() | node4.HasEvents());
                             }
                             {
                                 Assignment_bt_Tank_Agressive_node7 node7 = new Assignment_bt_Tank_Agressive_node7();
                                 node7.SetClassNameString("Assignment");
                                 node7.SetId(7);
     #if !BEHAVIAC_RELEASE
                                 node7.SetAgentType("Player");
     #endif
                                 node3.AddChild(node7);
                                 node3.SetHasEvents(node3.HasEvents() | node7.HasEvents());
                             }
                             {
                                 Action_bt_Tank_Agressive_node33 node33 = new Action_bt_Tank_Agressive_node33();
                                 node33.SetClassNameString("Action");
                                 node33.SetId(33);
     #if !BEHAVIAC_RELEASE
                                 node33.SetAgentType("Player");
     #endif
                                 node3.AddChild(node33);
                                 node3.SetHasEvents(node3.HasEvents() | node33.HasEvents());
                             }
                             {
                                 Action_bt_Tank_Agressive_node13 node13 = new Action_bt_Tank_Agressive_node13();
                                 node13.SetClassNameString("Action");
                                 node13.SetId(13);
     #if !BEHAVIAC_RELEASE
                                 node13.SetAgentType("Player");
     #endif
                                 node3.AddChild(node13);
                                 node3.SetHasEvents(node3.HasEvents() | node13.HasEvents());
                             }
                             node15.SetHasEvents(node15.HasEvents() | node3.HasEvents());
                         }
                         node39.SetHasEvents(node39.HasEvents() | node15.HasEvents());
                     }
                     {
                         Sequence node23 = new Sequence();
                         node23.SetClassNameString("Sequence");
                         node23.SetId(23);
     #if !BEHAVIAC_RELEASE
                         node23.SetAgentType("Player");
     #endif
                         node39.AddChild(node23);
                         {
                             Condition_bt_Tank_Agressive_node6 node6 = new Condition_bt_Tank_Agressive_node6();
                             node6.SetClassNameString("Condition");
                             node6.SetId(6);
     #if !BEHAVIAC_RELEASE
                             node6.SetAgentType("Player");
     #endif
                             node23.AddChild(node6);
                             node23.SetHasEvents(node23.HasEvents() | node6.HasEvents());
                         }
                         {
                             Parallel_bt_Tank_Agressive_node1 node1 = new Parallel_bt_Tank_Agressive_node1();
                             node1.SetClassNameString("Parallel");
                             node1.SetId(1);
     #if !BEHAVIAC_RELEASE
                             node1.SetAgentType("Player");
     #endif
                             node23.AddChild(node1);
                             {
                                 Sequence node12 = new Sequence();
                                 node12.SetClassNameString("Sequence");
                                 node12.SetId(12);
     #if !BEHAVIAC_RELEASE
                                 node12.SetAgentType("Player");
     #endif
                                 node1.AddChild(node12);
                                 {
                                     SelectorStochastic_bt_Tank_Agressive_node9 node9 = new SelectorStochastic_bt_Tank_Agressive_node9();
                                     node9.SetClassNameString("SelectorStochastic");
                                     node9.SetId(9);
     #if !BEHAVIAC_RELEASE
                                     node9.SetAgentType("Player");
     #endif
                                     node12.AddChild(node9);
                                     {
                                         Assignment_bt_Tank_Agressive_node36 node36 = new Assignment_bt_Tank_Agressive_node36();
                                         node36.SetClassNameString("Assignment");
                                         node36.SetId(36);
     #if !BEHAVIAC_RELEASE
                                         node36.SetAgentType("Player");
     #endif
                                         node9.AddChild(node36);
                                         node9.SetHasEvents(node9.HasEvents() | node36.HasEvents());
                                     }
                                     {
                                         Assignment_bt_Tank_Agressive_node11 node11 = new Assignment_bt_Tank_Agressive_node11();
                                         node11.SetClassNameString("Assignment");
                                         node11.SetId(11);
     #if !BEHAVIAC_RELEASE
                                         node11.SetAgentType("Player");
     #endif
                                         node9.AddChild(node11);
                                         node9.SetHasEvents(node9.HasEvents() | node11.HasEvents());
                                     }
                                     {
                                         Assignment_bt_Tank_Agressive_node14 node14 = new Assignment_bt_Tank_Agressive_node14();
                                         node14.SetClassNameString("Assignment");
                                         node14.SetId(14);
     #if !BEHAVIAC_RELEASE
                                         node14.SetAgentType("Player");
     #endif
                                         node9.AddChild(node14);
                                         node9.SetHasEvents(node9.HasEvents() | node14.HasEvents());
                                     }
                                     {
                                         Assignment_bt_Tank_Agressive_node16 node16 = new Assignment_bt_Tank_Agressive_node16();
                                         node16.SetClassNameString("Assignment");
                                         node16.SetId(16);
     #if !BEHAVIAC_RELEASE
                                         node16.SetAgentType("Player");
     #endif
                                         node9.AddChild(node16);
                                         node9.SetHasEvents(node9.HasEvents() | node16.HasEvents());
                                     }
                                     node12.SetHasEvents(node12.HasEvents() | node9.HasEvents());
                                 }
                                 {
                                     Wait_bt_Tank_Agressive_node17 node17 = new Wait_bt_Tank_Agressive_node17();
                                     node17.SetClassNameString("Wait");
                                     node17.SetId(17);
     #if !BEHAVIAC_RELEASE
                                     node17.SetAgentType("Player");
     #endif
                                     node12.AddChild(node17);
                                     node12.SetHasEvents(node12.HasEvents() | node17.HasEvents());
                                 }
                                 node1.SetHasEvents(node1.HasEvents() | node12.HasEvents());
                             }
                             {
                                 Sequence node49 = new Sequence();
                                 node49.SetClassNameString("Sequence");
                                 node49.SetId(49);
     #if !BEHAVIAC_RELEASE
                                 node49.SetAgentType("Player");
     #endif
                                 node1.AddChild(node49);
                                 {
                                     Assignment_bt_Tank_Agressive_node18 node18 = new Assignment_bt_Tank_Agressive_node18();
                                     node18.SetClassNameString("Assignment");
                                     node18.SetId(18);
     #if !BEHAVIAC_RELEASE
                                     node18.SetAgentType("Player");
     #endif
                                     node49.AddChild(node18);
                                     node49.SetHasEvents(node49.HasEvents() | node18.HasEvents());
                                 }
                                 {
                                     Action_bt_Tank_Agressive_node27 node27 = new Action_bt_Tank_Agressive_node27();
                                     node27.SetClassNameString("Action");
                                     node27.SetId(27);
     #if !BEHAVIAC_RELEASE
                                     node27.SetAgentType("Player");
     #endif
                                     node49.AddChild(node27);
                                     node49.SetHasEvents(node49.HasEvents() | node27.HasEvents());
                                 }
                                 node1.SetHasEvents(node1.HasEvents() | node49.HasEvents());
                             }
                             node23.SetHasEvents(node23.HasEvents() | node1.HasEvents());
                         }
                         node39.SetHasEvents(node39.HasEvents() | node23.HasEvents());
                     }
                     node38.SetHasEvents(node38.HasEvents() | node39.HasEvents());
                 }
                 node0.SetHasEvents(node0.HasEvents() | node38.HasEvents());
             }
             {
                 DecoratorAlwaysRunning_bt_Tank_Agressive_node10 node10 = new DecoratorAlwaysRunning_bt_Tank_Agressive_node10();
                 node10.SetClassNameString("DecoratorAlwaysRunning");
                 node10.SetId(10);
     #if !BEHAVIAC_RELEASE
                 node10.SetAgentType("Player");
     #endif
                 node0.AddChild(node10);
                 {
                     Sequence node28 = new Sequence();
                     node28.SetClassNameString("Sequence");
                     node28.SetId(28);
     #if !BEHAVIAC_RELEASE
                     node28.SetAgentType("Player");
     #endif
                     node10.AddChild(node28);
                     {
                         Assignment_bt_Tank_Agressive_node29 node29 = new Assignment_bt_Tank_Agressive_node29();
                         node29.SetClassNameString("Assignment");
                         node29.SetId(29);
     #if !BEHAVIAC_RELEASE
                         node29.SetAgentType("Player");
     #endif
                         node28.AddChild(node29);
                         node28.SetHasEvents(node28.HasEvents() | node29.HasEvents());
                     }
                     {
                         Condition_bt_Tank_Agressive_node30 node30 = new Condition_bt_Tank_Agressive_node30();
                         node30.SetClassNameString("Condition");
                         node30.SetId(30);
     #if !BEHAVIAC_RELEASE
                         node30.SetAgentType("Player");
     #endif
                         node28.AddChild(node30);
                         node28.SetHasEvents(node28.HasEvents() | node30.HasEvents());
                     }
                     {
                         Action_bt_Tank_Agressive_node31 node31 = new Action_bt_Tank_Agressive_node31();
                         node31.SetClassNameString("Action");
                         node31.SetId(31);
     #if !BEHAVIAC_RELEASE
                         node31.SetAgentType("Player");
     #endif
                         node28.AddChild(node31);
                         node28.SetHasEvents(node28.HasEvents() | node31.HasEvents());
                     }
                     {
                         Action_bt_Tank_Agressive_node32 node32 = new Action_bt_Tank_Agressive_node32();
                         node32.SetClassNameString("Action");
                         node32.SetId(32);
     #if !BEHAVIAC_RELEASE
                         node32.SetAgentType("Player");
     #endif
                         node28.AddChild(node32);
                         node28.SetHasEvents(node28.HasEvents() | node32.HasEvents());
                     }
                     node10.SetHasEvents(node10.HasEvents() | node28.HasEvents());
                 }
                 node0.SetHasEvents(node0.HasEvents() | node10.HasEvents());
             }
             node2.SetHasEvents(node2.HasEvents() | node0.HasEvents());
         }
         bt.SetHasEvents(bt.HasEvents() | node2.HasEvents());
     }
     return true;
 }
コード例 #10
0
 public static bool build_behavior_tree(BehaviorTree bt)
 {
     bt.SetClassNameString("BehaviorTree");
     bt.SetId(-1);
     bt.SetName("Tank_Destroy_Enemy");
     #if !BEHAVIAC_RELEASE
     bt.SetAgentType("Player");
     #endif
     // pars
     bt.AddPar("UnityEngine.Vector3", "parT_enemyPosition", "{kEpsilon=0;x=0;y=0;z=0;}", "");
     bt.AddPar("behaviac.Agent", "parT_nearestEnemy", "null", "");
     // children
     {
         DecoratorAlwaysRunning_bt_Tank_Destroy_Enemy_node10 node10 = new DecoratorAlwaysRunning_bt_Tank_Destroy_Enemy_node10();
         node10.SetClassNameString("DecoratorAlwaysRunning");
         node10.SetId(10);
     #if !BEHAVIAC_RELEASE
         node10.SetAgentType("Player");
     #endif
         bt.AddChild(node10);
         {
             Selector node11 = new Selector();
             node11.SetClassNameString("Selector");
             node11.SetId(11);
     #if !BEHAVIAC_RELEASE
             node11.SetAgentType("Player");
     #endif
             node10.AddChild(node11);
             {
                 Sequence node2 = new Sequence();
                 node2.SetClassNameString("Sequence");
                 node2.SetId(2);
     #if !BEHAVIAC_RELEASE
                 node2.SetAgentType("Player");
     #endif
                 node11.AddChild(node2);
                 {
                     Assignment_bt_Tank_Destroy_Enemy_node5 node5 = new Assignment_bt_Tank_Destroy_Enemy_node5();
                     node5.SetClassNameString("Assignment");
                     node5.SetId(5);
     #if !BEHAVIAC_RELEASE
                     node5.SetAgentType("Player");
     #endif
                     node2.AddChild(node5);
                     node2.SetHasEvents(node2.HasEvents() | node5.HasEvents());
                 }
                 {
                     Condition_bt_Tank_Destroy_Enemy_node9 node9 = new Condition_bt_Tank_Destroy_Enemy_node9();
                     node9.SetClassNameString("Condition");
                     node9.SetId(9);
     #if !BEHAVIAC_RELEASE
                     node9.SetAgentType("Player");
     #endif
                     node2.AddChild(node9);
                     node2.SetHasEvents(node2.HasEvents() | node9.HasEvents());
                 }
                 {
                     Assignment_bt_Tank_Destroy_Enemy_node7 node7 = new Assignment_bt_Tank_Destroy_Enemy_node7();
                     node7.SetClassNameString("Assignment");
                     node7.SetId(7);
     #if !BEHAVIAC_RELEASE
                     node7.SetAgentType("Player");
     #endif
                     node2.AddChild(node7);
                     node2.SetHasEvents(node2.HasEvents() | node7.HasEvents());
                 }
                 {
                     Action_bt_Tank_Destroy_Enemy_node8 node8 = new Action_bt_Tank_Destroy_Enemy_node8();
                     node8.SetClassNameString("Action");
                     node8.SetId(8);
     #if !BEHAVIAC_RELEASE
                     node8.SetAgentType("Player");
     #endif
                     node2.AddChild(node8);
                     node2.SetHasEvents(node2.HasEvents() | node8.HasEvents());
                 }
                 {
                     Action_bt_Tank_Destroy_Enemy_node6 node6 = new Action_bt_Tank_Destroy_Enemy_node6();
                     node6.SetClassNameString("Action");
                     node6.SetId(6);
     #if !BEHAVIAC_RELEASE
                     node6.SetAgentType("Player");
     #endif
                     node2.AddChild(node6);
                     node2.SetHasEvents(node2.HasEvents() | node6.HasEvents());
                 }
                 node11.SetHasEvents(node11.HasEvents() | node2.HasEvents());
             }
             {
                 Sequence node0 = new Sequence();
                 node0.SetClassNameString("Sequence");
                 node0.SetId(0);
     #if !BEHAVIAC_RELEASE
                 node0.SetAgentType("Player");
     #endif
                 node11.AddChild(node0);
                 {
                     Condition_bt_Tank_Destroy_Enemy_node12 node12 = new Condition_bt_Tank_Destroy_Enemy_node12();
                     node12.SetClassNameString("Condition");
                     node12.SetId(12);
     #if !BEHAVIAC_RELEASE
                     node12.SetAgentType("Player");
     #endif
                     node0.AddChild(node12);
                     node0.SetHasEvents(node0.HasEvents() | node12.HasEvents());
                 }
                 {
                     Action_bt_Tank_Destroy_Enemy_node1 node1 = new Action_bt_Tank_Destroy_Enemy_node1();
                     node1.SetClassNameString("Action");
                     node1.SetId(1);
     #if !BEHAVIAC_RELEASE
                     node1.SetAgentType("Player");
     #endif
                     node0.AddChild(node1);
                     node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
                 }
                 {
                     Action_bt_Tank_Destroy_Enemy_node3 node3 = new Action_bt_Tank_Destroy_Enemy_node3();
                     node3.SetClassNameString("Action");
                     node3.SetId(3);
     #if !BEHAVIAC_RELEASE
                     node3.SetAgentType("Player");
     #endif
                     node0.AddChild(node3);
                     node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
                 }
                 {
                     Action_bt_Tank_Destroy_Enemy_node4 node4 = new Action_bt_Tank_Destroy_Enemy_node4();
                     node4.SetClassNameString("Action");
                     node4.SetId(4);
     #if !BEHAVIAC_RELEASE
                     node4.SetAgentType("Player");
     #endif
                     node0.AddChild(node4);
                     node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
                 }
                 node11.SetHasEvents(node11.HasEvents() | node0.HasEvents());
             }
             node10.SetHasEvents(node10.HasEvents() | node11.HasEvents());
         }
         bt.SetHasEvents(bt.HasEvents() | node10.HasEvents());
     }
     return true;
 }
コード例 #11
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/query_ut_0");
			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
				// attachments
				{
					Precondition_bt_node_test_query_ut_0_attach1 attach1 = new Precondition_bt_node_test_query_ut_0_attach1();
					attach1.SetClassNameString("Precondition");
					attach1.SetId(1);
#if !BEHAVIAC_RELEASE
					attach1.SetAgentType("AgentNodeTest");
#endif
					node0.Attach(attach1, true, false, false);
				}
				{
					Effector_bt_node_test_query_ut_0_attach2 attach2 = new Effector_bt_node_test_query_ut_0_attach2();
					attach2.SetClassNameString("Effector");
					attach2.SetId(2);
#if !BEHAVIAC_RELEASE
					attach2.SetAgentType("AgentNodeTest");
#endif
					node0.Attach(attach2, false, true, false);
				}
				bt.AddChild(node0);
				{
					Query_bt_node_test_query_ut_0_node5 node5 = new Query_bt_node_test_query_ut_0_node5();
					node5.SetClassNameString("Query");
					node5.SetId(5);
#if !BEHAVIAC_RELEASE
					node5.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node5);
					node0.SetHasEvents(node0.HasEvents() | node5.HasEvents());
				}
				{
					Selector node6 = new Selector();
					node6.SetClassNameString("Selector");
					node6.SetId(6);
#if !BEHAVIAC_RELEASE
					node6.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node6);
					{
						Query_bt_node_test_query_ut_0_node3 node3 = new Query_bt_node_test_query_ut_0_node3();
						node3.SetClassNameString("Query");
						node3.SetId(3);
#if !BEHAVIAC_RELEASE
						node3.SetAgentType("AgentNodeTest");
#endif
						node6.AddChild(node3);
						node6.SetHasEvents(node6.HasEvents() | node3.HasEvents());
					}
					{
						Query_bt_node_test_query_ut_0_node4 node4 = new Query_bt_node_test_query_ut_0_node4();
						node4.SetClassNameString("Query");
						node4.SetId(4);
#if !BEHAVIAC_RELEASE
						node4.SetAgentType("AgentNodeTest");
#endif
						node6.AddChild(node4);
						node6.SetHasEvents(node6.HasEvents() | node4.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node6.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
コード例 #12
0
        public static bool build_behavior_tree(BehaviorTree bt)
        {
            bt.SetClassNameString("BehaviorTree");
            bt.SetId(-1);
            bt.SetName("HoverBotBT");
            bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
            bt.SetAgentType("HoverBotAgent");
#endif
            // children
            {
                Selector node0 = new Selector();
                node0.SetClassNameString("Selector");
                node0.SetId(0);
#if !BEHAVIAC_RELEASE
                node0.SetAgentType("HoverBotAgent");
#endif
                bt.AddChild(node0);
                {
                    Sequence node2 = new Sequence();
                    node2.SetClassNameString("Sequence");
                    node2.SetId(2);
#if !BEHAVIAC_RELEASE
                    node2.SetAgentType("HoverBotAgent");
#endif
                    node0.AddChild(node2);
                    {
                        Condition_bt_HoverBotBT_node3 node3 = new Condition_bt_HoverBotBT_node3();
                        node3.SetClassNameString("Condition");
                        node3.SetId(3);
#if !BEHAVIAC_RELEASE
                        node3.SetAgentType("HoverBotAgent");
#endif
                        node2.AddChild(node3);
                        node2.SetHasEvents(node2.HasEvents() | node3.HasEvents());
                    }
                    {
                        Action_bt_HoverBotBT_node1 node1 = new Action_bt_HoverBotBT_node1();
                        node1.SetClassNameString("Action");
                        node1.SetId(1);
#if !BEHAVIAC_RELEASE
                        node1.SetAgentType("HoverBotAgent");
#endif
                        node2.AddChild(node1);
                        node2.SetHasEvents(node2.HasEvents() | node1.HasEvents());
                    }
                    node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
                }
                {
                    Selector node5 = new Selector();
                    node5.SetClassNameString("Selector");
                    node5.SetId(5);
#if !BEHAVIAC_RELEASE
                    node5.SetAgentType("HoverBotAgent");
#endif
                    node0.AddChild(node5);
                    {
                        Sequence node7 = new Sequence();
                        node7.SetClassNameString("Sequence");
                        node7.SetId(7);
#if !BEHAVIAC_RELEASE
                        node7.SetAgentType("HoverBotAgent");
#endif
                        node5.AddChild(node7);
                        {
                            Action_bt_HoverBotBT_node6 node6 = new Action_bt_HoverBotBT_node6();
                            node6.SetClassNameString("Action");
                            node6.SetId(6);
#if !BEHAVIAC_RELEASE
                            node6.SetAgentType("HoverBotAgent");
#endif
                            node7.AddChild(node6);
                            node7.SetHasEvents(node7.HasEvents() | node6.HasEvents());
                        }
                        {
                            Condition_bt_HoverBotBT_node8 node8 = new Condition_bt_HoverBotBT_node8();
                            node8.SetClassNameString("Condition");
                            node8.SetId(8);
#if !BEHAVIAC_RELEASE
                            node8.SetAgentType("HoverBotAgent");
#endif
                            node7.AddChild(node8);
                            node7.SetHasEvents(node7.HasEvents() | node8.HasEvents());
                        }
                        node5.SetHasEvents(node5.HasEvents() | node7.HasEvents());
                    }
                    {
                        Sequence node9 = new Sequence();
                        node9.SetClassNameString("Sequence");
                        node9.SetId(9);
#if !BEHAVIAC_RELEASE
                        node9.SetAgentType("HoverBotAgent");
#endif
                        node5.AddChild(node9);
                        {
                            Condition_bt_HoverBotBT_node10 node10 = new Condition_bt_HoverBotBT_node10();
                            node10.SetClassNameString("Condition");
                            node10.SetId(10);
#if !BEHAVIAC_RELEASE
                            node10.SetAgentType("HoverBotAgent");
#endif
                            node9.AddChild(node10);
                            node9.SetHasEvents(node9.HasEvents() | node10.HasEvents());
                        }
                        {
                            Action_bt_HoverBotBT_node4 node4 = new Action_bt_HoverBotBT_node4();
                            node4.SetClassNameString("Action");
                            node4.SetId(4);
#if !BEHAVIAC_RELEASE
                            node4.SetAgentType("HoverBotAgent");
#endif
                            node9.AddChild(node4);
                            node9.SetHasEvents(node9.HasEvents() | node4.HasEvents());
                        }
                        node5.SetHasEvents(node5.HasEvents() | node9.HasEvents());
                    }
                    node0.SetHasEvents(node0.HasEvents() | node5.HasEvents());
                }
                bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
            }
            return(true);
        }
コード例 #13
0
ファイル: generated_behaviors.cs プロジェクト: nusus/behaviac
 public static bool build_behavior_tree(BehaviorTree bt)
 {
     bt.SetClassNameString("BehaviorTree");
     bt.SetId(-1);
     bt.SetName("node_test/query_ut_0");
     #if !BEHAVIAC_RELEASE
     bt.SetAgentType("AgentNodeTest");
     #endif
     // children
     {
         Sequence_bt_node_test_query_ut_0_node0 node0 = new Sequence_bt_node_test_query_ut_0_node0();
         node0.SetClassNameString("Sequence");
         node0.SetId(0);
     #if !BEHAVIAC_RELEASE
         node0.SetAgentType("AgentNodeTest");
     #endif
         bt.AddChild(node0);
         {
             Query_bt_node_test_query_ut_0_node1 node1 = new Query_bt_node_test_query_ut_0_node1();
             node1.SetClassNameString("Query");
             node1.SetId(1);
     #if !BEHAVIAC_RELEASE
             node1.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node1);
             node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
         }
         {
             Selector node2 = new Selector();
             node2.SetClassNameString("Selector");
             node2.SetId(2);
     #if !BEHAVIAC_RELEASE
             node2.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node2);
             {
                 Query_bt_node_test_query_ut_0_node3 node3 = new Query_bt_node_test_query_ut_0_node3();
                 node3.SetClassNameString("Query");
                 node3.SetId(3);
     #if !BEHAVIAC_RELEASE
                 node3.SetAgentType("AgentNodeTest");
     #endif
                 node2.AddChild(node3);
                 node2.SetHasEvents(node2.HasEvents() | node3.HasEvents());
             }
             {
                 Query_bt_node_test_query_ut_0_node4 node4 = new Query_bt_node_test_query_ut_0_node4();
                 node4.SetClassNameString("Query");
                 node4.SetId(4);
     #if !BEHAVIAC_RELEASE
                 node4.SetAgentType("AgentNodeTest");
     #endif
                 node2.AddChild(node4);
                 node2.SetHasEvents(node2.HasEvents() | node4.HasEvents());
             }
             node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
         }
         bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
     }
     return true;
 }
コード例 #14
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/circular_ut_0");
			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);
				{
					Sequence node2 = new Sequence();
					node2.SetClassNameString("Sequence");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node2);
					{
						Condition_bt_node_test_circular_ut_0_node5 node5 = new Condition_bt_node_test_circular_ut_0_node5();
						node5.SetClassNameString("Condition");
						node5.SetId(5);
#if !BEHAVIAC_RELEASE
						node5.SetAgentType("AgentNodeTest");
#endif
						node2.AddChild(node5);
						node2.SetHasEvents(node2.HasEvents() | node5.HasEvents());
					}
					{
						Sequence node4 = new Sequence();
						node4.SetClassNameString("Sequence");
						node4.SetId(4);
#if !BEHAVIAC_RELEASE
						node4.SetAgentType("AgentNodeTest");
#endif
						node2.AddChild(node4);
						{
							Assignment_bt_node_test_circular_ut_0_node3 node3 = new Assignment_bt_node_test_circular_ut_0_node3();
							node3.SetClassNameString("Assignment");
							node3.SetId(3);
#if !BEHAVIAC_RELEASE
							node3.SetAgentType("AgentNodeTest");
#endif
							node4.AddChild(node3);
							node4.SetHasEvents(node4.HasEvents() | node3.HasEvents());
						}
						{
							ReferencedBehavior_bt_node_test_circular_ut_0_node6 node6 = new ReferencedBehavior_bt_node_test_circular_ut_0_node6();
							node6.SetClassNameString("ReferencedBehavior");
							node6.SetId(6);
#if !BEHAVIAC_RELEASE
							node6.SetAgentType("AgentNodeTest");
#endif
							node4.AddChild(node6);
							node4.SetHasEvents(node4.HasEvents() | node6.HasEvents());
						}
						node2.SetHasEvents(node2.HasEvents() | node4.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Compute_bt_node_test_circular_ut_0_node1 node1 = new Compute_bt_node_test_circular_ut_0_node1();
					node1.SetClassNameString("Compute");
					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;
		}
コード例 #15
0
 public static bool build_behavior_tree(BehaviorTree bt)
 {
     bt.SetClassNameString("BehaviorTree");
     bt.SetId(-1);
     bt.SetName("Tank_WalkUtilCollision");
     #if !BEHAVIAC_RELEASE
     bt.SetAgentType("Player");
     #endif
     // pars
     bt.AddPar("UnityEngine.Vector3", "parT_moveTarget", "{kEpsilon=0;x=0;y=0;z=0;}", "");
     bt.AddPar("Player", "parIn_Self", "null", "");
     bt.AddPar("float", "parT_RotateAngle", "0", "");
     // children
     {
         DecoratorLoop_bt_Tank_WalkUtilCollision_node0 node0 = new DecoratorLoop_bt_Tank_WalkUtilCollision_node0();
         node0.SetClassNameString("DecoratorLoop");
         node0.SetId(0);
     #if !BEHAVIAC_RELEASE
         node0.SetAgentType("Player");
     #endif
         bt.AddChild(node0);
         {
             Selector node4 = new Selector();
             node4.SetClassNameString("Selector");
             node4.SetId(4);
     #if !BEHAVIAC_RELEASE
             node4.SetAgentType("Player");
     #endif
             node0.AddChild(node4);
             {
                 Action_bt_Tank_WalkUtilCollision_node1 node1 = new Action_bt_Tank_WalkUtilCollision_node1();
                 node1.SetClassNameString("Action");
                 node1.SetId(1);
     #if !BEHAVIAC_RELEASE
                 node1.SetAgentType("Player");
     #endif
                 node4.AddChild(node1);
                 node4.SetHasEvents(node4.HasEvents() | node1.HasEvents());
             }
             {
                 Sequence node9 = new Sequence();
                 node9.SetClassNameString("Sequence");
                 node9.SetId(9);
     #if !BEHAVIAC_RELEASE
                 node9.SetAgentType("Player");
     #endif
                 node4.AddChild(node9);
                 {
                     Assignment_bt_Tank_WalkUtilCollision_node6 node6 = new Assignment_bt_Tank_WalkUtilCollision_node6();
                     node6.SetClassNameString("Assignment");
                     node6.SetId(6);
     #if !BEHAVIAC_RELEASE
                     node6.SetAgentType("Player");
     #endif
                     node9.AddChild(node6);
                     node9.SetHasEvents(node9.HasEvents() | node6.HasEvents());
                 }
                 {
                     Sequence node2 = new Sequence();
                     node2.SetClassNameString("Sequence");
                     node2.SetId(2);
     #if !BEHAVIAC_RELEASE
                     node2.SetAgentType("Player");
     #endif
                     node9.AddChild(node2);
                     {
                         Condition_bt_Tank_WalkUtilCollision_node7 node7 = new Condition_bt_Tank_WalkUtilCollision_node7();
                         node7.SetClassNameString("Condition");
                         node7.SetId(7);
     #if !BEHAVIAC_RELEASE
                         node7.SetAgentType("Player");
     #endif
                         node2.AddChild(node7);
                         node2.SetHasEvents(node2.HasEvents() | node7.HasEvents());
                     }
                     {
                         Action_bt_Tank_WalkUtilCollision_node22 node22 = new Action_bt_Tank_WalkUtilCollision_node22();
                         node22.SetClassNameString("Action");
                         node22.SetId(22);
     #if !BEHAVIAC_RELEASE
                         node22.SetAgentType("Player");
     #endif
                         node2.AddChild(node22);
                         node2.SetHasEvents(node2.HasEvents() | node22.HasEvents());
                     }
                     node9.SetHasEvents(node9.HasEvents() | node2.HasEvents());
                 }
                 node4.SetHasEvents(node4.HasEvents() | node9.HasEvents());
             }
             node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
         }
         bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
     }
     return true;
 }
コード例 #16
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/decoration_alwayssuccess_ut_0");
			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);
				{
					Selector node4 = new Selector();
					node4.SetClassNameString("Selector");
					node4.SetId(4);
#if !BEHAVIAC_RELEASE
					node4.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node4);
					{
						DecoratorAlwaysSuccess_bt_node_test_decoration_alwayssuccess_ut_0_node1 node1 = new DecoratorAlwaysSuccess_bt_node_test_decoration_alwayssuccess_ut_0_node1();
						node1.SetClassNameString("DecoratorAlwaysSuccess");
						node1.SetId(1);
#if !BEHAVIAC_RELEASE
						node1.SetAgentType("AgentNodeTest");
#endif
						node4.AddChild(node1);
						{
							Action_bt_node_test_decoration_alwayssuccess_ut_0_node5 node5 = new Action_bt_node_test_decoration_alwayssuccess_ut_0_node5();
							node5.SetClassNameString("Action");
							node5.SetId(5);
#if !BEHAVIAC_RELEASE
							node5.SetAgentType("AgentNodeTest");
#endif
							node1.AddChild(node5);
							node1.SetHasEvents(node1.HasEvents() | node5.HasEvents());
						}
						node4.SetHasEvents(node4.HasEvents() | node1.HasEvents());
					}
					{
						Action_bt_node_test_decoration_alwayssuccess_ut_0_node6 node6 = new Action_bt_node_test_decoration_alwayssuccess_ut_0_node6();
						node6.SetClassNameString("Action");
						node6.SetId(6);
#if !BEHAVIAC_RELEASE
						node6.SetAgentType("AgentNodeTest");
#endif
						node4.AddChild(node6);
						node4.SetHasEvents(node4.HasEvents() | node6.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
				}
				{
					Selector node2 = new Selector();
					node2.SetClassNameString("Selector");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node2);
					{
						DecoratorAlwaysSuccess_bt_node_test_decoration_alwayssuccess_ut_0_node3 node3 = new DecoratorAlwaysSuccess_bt_node_test_decoration_alwayssuccess_ut_0_node3();
						node3.SetClassNameString("DecoratorAlwaysSuccess");
						node3.SetId(3);
#if !BEHAVIAC_RELEASE
						node3.SetAgentType("AgentNodeTest");
#endif
						node2.AddChild(node3);
						{
							Action_bt_node_test_decoration_alwayssuccess_ut_0_node7 node7 = new Action_bt_node_test_decoration_alwayssuccess_ut_0_node7();
							node7.SetClassNameString("Action");
							node7.SetId(7);
#if !BEHAVIAC_RELEASE
							node7.SetAgentType("AgentNodeTest");
#endif
							node3.AddChild(node7);
							node3.SetHasEvents(node3.HasEvents() | node7.HasEvents());
						}
						node2.SetHasEvents(node2.HasEvents() | node3.HasEvents());
					}
					{
						Action_bt_node_test_decoration_alwayssuccess_ut_0_node8 node8 = new Action_bt_node_test_decoration_alwayssuccess_ut_0_node8();
						node8.SetClassNameString("Action");
						node8.SetId(8);
#if !BEHAVIAC_RELEASE
						node8.SetAgentType("AgentNodeTest");
#endif
						node2.AddChild(node8);
						node2.SetHasEvents(node2.HasEvents() | node8.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Selector node9 = new Selector();
					node9.SetClassNameString("Selector");
					node9.SetId(9);
#if !BEHAVIAC_RELEASE
					node9.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node9);
					{
						DecoratorAlwaysSuccess_bt_node_test_decoration_alwayssuccess_ut_0_node10 node10 = new DecoratorAlwaysSuccess_bt_node_test_decoration_alwayssuccess_ut_0_node10();
						node10.SetClassNameString("DecoratorAlwaysSuccess");
						node10.SetId(10);
#if !BEHAVIAC_RELEASE
						node10.SetAgentType("AgentNodeTest");
#endif
						node9.AddChild(node10);
						{
							Action_bt_node_test_decoration_alwayssuccess_ut_0_node11 node11 = new Action_bt_node_test_decoration_alwayssuccess_ut_0_node11();
							node11.SetClassNameString("Action");
							node11.SetId(11);
#if !BEHAVIAC_RELEASE
							node11.SetAgentType("AgentNodeTest");
#endif
							node10.AddChild(node11);
							node10.SetHasEvents(node10.HasEvents() | node11.HasEvents());
						}
						node9.SetHasEvents(node9.HasEvents() | node10.HasEvents());
					}
					{
						Action_bt_node_test_decoration_alwayssuccess_ut_0_node12 node12 = new Action_bt_node_test_decoration_alwayssuccess_ut_0_node12();
						node12.SetClassNameString("Action");
						node12.SetId(12);
#if !BEHAVIAC_RELEASE
						node12.SetAgentType("AgentNodeTest");
#endif
						node9.AddChild(node12);
						node9.SetHasEvents(node9.HasEvents() | node12.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node9.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
コード例 #17
0
 public static bool build_behavior_tree(BehaviorTree bt)
 {
     bt.SetClassNameString("BehaviorTree");
     bt.SetId(-1);
     bt.SetName("Level_DeathMatch_1");
     #if !BEHAVIAC_RELEASE
     bt.SetAgentType("GameLevelCommon");
     #endif
     // pars
     bt.AddPar("vector<int>", "parT_PlayerIDs", "4:10|11|12|13", "");
     bt.AddPar("int", "parT_ID", "0", "");
     bt.AddPar("int", "parT_Life", "0", "");
     bt.AddPar("int", "parT_PlayerIndex", "0", "");
     bt.AddPar("vector<int>", "parT_LifeCounts", "4:1|1|1|1", "");
     bt.AddPar("int", "parT_EnemyCount", "0", "");
     bt.AddPar("int", "parT_AwardX", "0", "");
     bt.AddPar("int", "parT_AwardY", "0", "");
     bt.AddPar("int", "parT_AwardType", "0", "");
     bt.AddPar("vector<UnityEngine.Color>", "parT_ForceColors", "4:{a=1;b=0;g=0;r=1;}|{a=1;b=1;g=0;r=0;}|{a=1;b=0;g=1;r=1;}|{a=1;b=0;g=1;r=0;}", "");
     bt.AddPar("vector<eGameForce>", "parT_Forces", "4:BLUE_FORCE|BLUE_FORCE|BLUE_FORCE|RED_FORCE", "");
     bt.AddPar("eGameForce", "parT_ActorForce", "BLUE_FORCE", "");
     bt.AddPar("UnityEngine.Color", "parT_ActorColor", "{a=0;b=0;g=0;r=0;}", "");
     bt.AddPar("int", "parT_RedForceID", "0", "");
     bt.AddPar("int", "parT_ActorCount", "4", "");
     bt.AddPar("vector<string>", "parT_BehaviorTree", "4:\"Tank_SafeWander_RandomFire\"|\"Tank_SafeWander_RandomFire\"|\"Tank_SafeWander_RandomFire\"|\"Tank_Agressive\"", "");
     bt.AddPar("string", "parT_Tree", "", "");
     // children
     {
         Selector node3 = new Selector();
         node3.SetClassNameString("Selector");
         node3.SetId(3);
     #if !BEHAVIAC_RELEASE
         node3.SetAgentType("GameLevelCommon");
     #endif
         bt.AddChild(node3);
         {
             DecoratorLoopUntil_bt_Level_DeathMatch_1_node10 node10 = new DecoratorLoopUntil_bt_Level_DeathMatch_1_node10();
             node10.SetClassNameString("DecoratorLoopUntil");
             node10.SetId(10);
     #if !BEHAVIAC_RELEASE
             node10.SetAgentType("GameLevelCommon");
     #endif
             node3.AddChild(node10);
             {
                 Sequence node17 = new Sequence();
                 node17.SetClassNameString("Sequence");
                 node17.SetId(17);
     #if !BEHAVIAC_RELEASE
                 node17.SetAgentType("GameLevelCommon");
     #endif
                 node10.AddChild(node17);
                 {
                     Condition_bt_Level_DeathMatch_1_node4 node4 = new Condition_bt_Level_DeathMatch_1_node4();
                     node4.SetClassNameString("Condition");
                     node4.SetId(4);
     #if !BEHAVIAC_RELEASE
                     node4.SetAgentType("GameLevelCommon");
     #endif
                     node17.AddChild(node4);
                     node17.SetHasEvents(node17.HasEvents() | node4.HasEvents());
                 }
                 {
                     Assignment_bt_Level_DeathMatch_1_node12 node12 = new Assignment_bt_Level_DeathMatch_1_node12();
                     node12.SetClassNameString("Assignment");
                     node12.SetId(12);
     #if !BEHAVIAC_RELEASE
                     node12.SetAgentType("GameLevelCommon");
     #endif
                     node17.AddChild(node12);
                     node17.SetHasEvents(node17.HasEvents() | node12.HasEvents());
                 }
                 {
                     Assignment_bt_Level_DeathMatch_1_node13 node13 = new Assignment_bt_Level_DeathMatch_1_node13();
                     node13.SetClassNameString("Assignment");
                     node13.SetId(13);
     #if !BEHAVIAC_RELEASE
                     node13.SetAgentType("GameLevelCommon");
     #endif
                     node17.AddChild(node13);
                     node17.SetHasEvents(node17.HasEvents() | node13.HasEvents());
                 }
                 {
                     Action_bt_Level_DeathMatch_1_node15 node15 = new Action_bt_Level_DeathMatch_1_node15();
                     node15.SetClassNameString("Action");
                     node15.SetId(15);
     #if !BEHAVIAC_RELEASE
                     node15.SetAgentType("GameLevelCommon");
     #endif
                     node17.AddChild(node15);
                     node17.SetHasEvents(node17.HasEvents() | node15.HasEvents());
                 }
                 {
                     Assignment_bt_Level_DeathMatch_1_node51 node51 = new Assignment_bt_Level_DeathMatch_1_node51();
                     node51.SetClassNameString("Assignment");
                     node51.SetId(51);
     #if !BEHAVIAC_RELEASE
                     node51.SetAgentType("GameLevelCommon");
     #endif
                     node17.AddChild(node51);
                     node17.SetHasEvents(node17.HasEvents() | node51.HasEvents());
                 }
                 {
                     DecoratorAlwaysSuccess_bt_Level_DeathMatch_1_node53 node53 = new DecoratorAlwaysSuccess_bt_Level_DeathMatch_1_node53();
                     node53.SetClassNameString("DecoratorAlwaysSuccess");
                     node53.SetId(53);
     #if !BEHAVIAC_RELEASE
                     node53.SetAgentType("GameLevelCommon");
     #endif
                     node17.AddChild(node53);
                     {
                         Sequence node54 = new Sequence();
                         node54.SetClassNameString("Sequence");
                         node54.SetId(54);
     #if !BEHAVIAC_RELEASE
                         node54.SetAgentType("GameLevelCommon");
     #endif
                         node53.AddChild(node54);
                         {
                             Condition_bt_Level_DeathMatch_1_node52 node52 = new Condition_bt_Level_DeathMatch_1_node52();
                             node52.SetClassNameString("Condition");
                             node52.SetId(52);
     #if !BEHAVIAC_RELEASE
                             node52.SetAgentType("GameLevelCommon");
     #endif
                             node54.AddChild(node52);
                             node54.SetHasEvents(node54.HasEvents() | node52.HasEvents());
                         }
                         {
                             Assignment_bt_Level_DeathMatch_1_node55 node55 = new Assignment_bt_Level_DeathMatch_1_node55();
                             node55.SetClassNameString("Assignment");
                             node55.SetId(55);
     #if !BEHAVIAC_RELEASE
                             node55.SetAgentType("GameLevelCommon");
     #endif
                             node54.AddChild(node55);
                             node54.SetHasEvents(node54.HasEvents() | node55.HasEvents());
                         }
                         {
                             Action_bt_Level_DeathMatch_1_node26 node26 = new Action_bt_Level_DeathMatch_1_node26();
                             node26.SetClassNameString("Action");
                             node26.SetId(26);
     #if !BEHAVIAC_RELEASE
                             node26.SetAgentType("GameLevelCommon");
     #endif
                             node54.AddChild(node26);
                             node54.SetHasEvents(node54.HasEvents() | node26.HasEvents());
                         }
                         node53.SetHasEvents(node53.HasEvents() | node54.HasEvents());
                     }
                     node17.SetHasEvents(node17.HasEvents() | node53.HasEvents());
                 }
                 {
                     Compute_bt_Level_DeathMatch_1_node16 node16 = new Compute_bt_Level_DeathMatch_1_node16();
                     node16.SetClassNameString("Compute");
                     node16.SetId(16);
     #if !BEHAVIAC_RELEASE
                     node16.SetAgentType("GameLevelCommon");
     #endif
                     node17.AddChild(node16);
                     node17.SetHasEvents(node17.HasEvents() | node16.HasEvents());
                 }
                 node10.SetHasEvents(node10.HasEvents() | node17.HasEvents());
             }
             node3.SetHasEvents(node3.HasEvents() | node10.HasEvents());
         }
         {
             Sequence node6 = new Sequence();
             node6.SetClassNameString("Sequence");
             node6.SetId(6);
     #if !BEHAVIAC_RELEASE
             node6.SetAgentType("GameLevelCommon");
     #endif
             node3.AddChild(node6);
             {
                 Wait_bt_Level_DeathMatch_1_node47 node47 = new Wait_bt_Level_DeathMatch_1_node47();
                 node47.SetClassNameString("Wait");
                 node47.SetId(47);
     #if !BEHAVIAC_RELEASE
                 node47.SetAgentType("GameLevelCommon");
     #endif
                 node6.AddChild(node47);
                 node6.SetHasEvents(node6.HasEvents() | node47.HasEvents());
             }
             {
                 DecoratorLoop_bt_Level_DeathMatch_1_node50 node50 = new DecoratorLoop_bt_Level_DeathMatch_1_node50();
                 node50.SetClassNameString("DecoratorLoop");
                 node50.SetId(50);
     #if !BEHAVIAC_RELEASE
                 node50.SetAgentType("GameLevelCommon");
     #endif
                 node6.AddChild(node50);
                 {
                     Parallel_bt_Level_DeathMatch_1_node14 node14 = new Parallel_bt_Level_DeathMatch_1_node14();
                     node14.SetClassNameString("Parallel");
                     node14.SetId(14);
     #if !BEHAVIAC_RELEASE
                     node14.SetAgentType("GameLevelCommon");
     #endif
                     node50.AddChild(node14);
                     {
                         Sequence node11 = new Sequence();
                         node11.SetClassNameString("Sequence");
                         node11.SetId(11);
     #if !BEHAVIAC_RELEASE
                         node11.SetAgentType("GameLevelCommon");
     #endif
                         node14.AddChild(node11);
                         {
                             DecoratorAlwaysSuccess_bt_Level_DeathMatch_1_node18 node18 = new DecoratorAlwaysSuccess_bt_Level_DeathMatch_1_node18();
                             node18.SetClassNameString("DecoratorAlwaysSuccess");
                             node18.SetId(18);
     #if !BEHAVIAC_RELEASE
                             node18.SetAgentType("GameLevelCommon");
     #endif
                             node11.AddChild(node18);
                             {
                                 Sequence node8 = new Sequence();
                                 node8.SetClassNameString("Sequence");
                                 node8.SetId(8);
     #if !BEHAVIAC_RELEASE
                                 node8.SetAgentType("GameLevelCommon");
     #endif
                                 node18.AddChild(node8);
                                 {
                                     Condition_bt_Level_DeathMatch_1_node9 node9 = new Condition_bt_Level_DeathMatch_1_node9();
                                     node9.SetClassNameString("Condition");
                                     node9.SetId(9);
     #if !BEHAVIAC_RELEASE
                                     node9.SetAgentType("GameLevelCommon");
     #endif
                                     node8.AddChild(node9);
                                     node8.SetHasEvents(node8.HasEvents() | node9.HasEvents());
                                 }
                                 {
                                     Assignment_bt_Level_DeathMatch_1_node19 node19 = new Assignment_bt_Level_DeathMatch_1_node19();
                                     node19.SetClassNameString("Assignment");
                                     node19.SetId(19);
     #if !BEHAVIAC_RELEASE
                                     node19.SetAgentType("GameLevelCommon");
     #endif
                                     node8.AddChild(node19);
                                     node8.SetHasEvents(node8.HasEvents() | node19.HasEvents());
                                 }
                                 node18.SetHasEvents(node18.HasEvents() | node8.HasEvents());
                             }
                             node11.SetHasEvents(node11.HasEvents() | node18.HasEvents());
                         }
                         {
                             Assignment_bt_Level_DeathMatch_1_node20 node20 = new Assignment_bt_Level_DeathMatch_1_node20();
                             node20.SetClassNameString("Assignment");
                             node20.SetId(20);
     #if !BEHAVIAC_RELEASE
                             node20.SetAgentType("GameLevelCommon");
     #endif
                             node11.AddChild(node20);
                             node11.SetHasEvents(node11.HasEvents() | node20.HasEvents());
                         }
                         {
                             DecoratorAlwaysSuccess_bt_Level_DeathMatch_1_node21 node21 = new DecoratorAlwaysSuccess_bt_Level_DeathMatch_1_node21();
                             node21.SetClassNameString("DecoratorAlwaysSuccess");
                             node21.SetId(21);
     #if !BEHAVIAC_RELEASE
                             node21.SetAgentType("GameLevelCommon");
     #endif
                             node11.AddChild(node21);
                             {
                                 Sequence node29 = new Sequence();
                                 node29.SetClassNameString("Sequence");
                                 node29.SetId(29);
     #if !BEHAVIAC_RELEASE
                                 node29.SetAgentType("GameLevelCommon");
     #endif
                                 node21.AddChild(node29);
                                 {
                                     DecoratorNot_bt_Level_DeathMatch_1_node36 node36 = new DecoratorNot_bt_Level_DeathMatch_1_node36();
                                     node36.SetClassNameString("DecoratorNot");
                                     node36.SetId(36);
     #if !BEHAVIAC_RELEASE
                                     node36.SetAgentType("GameLevelCommon");
     #endif
                                     node29.AddChild(node36);
                                     {
                                         Action_bt_Level_DeathMatch_1_node7 node7 = new Action_bt_Level_DeathMatch_1_node7();
                                         node7.SetClassNameString("Action");
                                         node7.SetId(7);
     #if !BEHAVIAC_RELEASE
                                         node7.SetAgentType("GameLevelCommon");
     #endif
                                         node36.AddChild(node7);
                                         node36.SetHasEvents(node36.HasEvents() | node7.HasEvents());
                                     }
                                     node29.SetHasEvents(node29.HasEvents() | node36.HasEvents());
                                 }
                                 {
                                     Assignment_bt_Level_DeathMatch_1_node39 node39 = new Assignment_bt_Level_DeathMatch_1_node39();
                                     node39.SetClassNameString("Assignment");
                                     node39.SetId(39);
     #if !BEHAVIAC_RELEASE
                                     node39.SetAgentType("GameLevelCommon");
     #endif
                                     node29.AddChild(node39);
                                     node29.SetHasEvents(node29.HasEvents() | node39.HasEvents());
                                 }
                                 {
                                     Condition_bt_Level_DeathMatch_1_node37 node37 = new Condition_bt_Level_DeathMatch_1_node37();
                                     node37.SetClassNameString("Condition");
                                     node37.SetId(37);
     #if !BEHAVIAC_RELEASE
                                     node37.SetAgentType("GameLevelCommon");
     #endif
                                     node29.AddChild(node37);
                                     node29.SetHasEvents(node29.HasEvents() | node37.HasEvents());
                                 }
                                 {
                                     Assignment_bt_Level_DeathMatch_1_node40 node40 = new Assignment_bt_Level_DeathMatch_1_node40();
                                     node40.SetClassNameString("Assignment");
                                     node40.SetId(40);
     #if !BEHAVIAC_RELEASE
                                     node40.SetAgentType("GameLevelCommon");
     #endif
                                     node29.AddChild(node40);
                                     node29.SetHasEvents(node29.HasEvents() | node40.HasEvents());
                                 }
                                 {
                                     Assignment_bt_Level_DeathMatch_1_node48 node48 = new Assignment_bt_Level_DeathMatch_1_node48();
                                     node48.SetClassNameString("Assignment");
                                     node48.SetId(48);
     #if !BEHAVIAC_RELEASE
                                     node48.SetAgentType("GameLevelCommon");
     #endif
                                     node29.AddChild(node48);
                                     node29.SetHasEvents(node29.HasEvents() | node48.HasEvents());
                                 }
                                 {
                                     Assignment_bt_Level_DeathMatch_1_node25 node25 = new Assignment_bt_Level_DeathMatch_1_node25();
                                     node25.SetClassNameString("Assignment");
                                     node25.SetId(25);
     #if !BEHAVIAC_RELEASE
                                     node25.SetAgentType("GameLevelCommon");
     #endif
                                     node29.AddChild(node25);
                                     node29.SetHasEvents(node29.HasEvents() | node25.HasEvents());
                                 }
                                 {
                                     Action_bt_Level_DeathMatch_1_node49 node49 = new Action_bt_Level_DeathMatch_1_node49();
                                     node49.SetClassNameString("Action");
                                     node49.SetId(49);
     #if !BEHAVIAC_RELEASE
                                     node49.SetAgentType("GameLevelCommon");
     #endif
                                     node29.AddChild(node49);
                                     node29.SetHasEvents(node29.HasEvents() | node49.HasEvents());
                                 }
                                 {
                                     Compute_bt_Level_DeathMatch_1_node41 node41 = new Compute_bt_Level_DeathMatch_1_node41();
                                     node41.SetClassNameString("Compute");
                                     node41.SetId(41);
     #if !BEHAVIAC_RELEASE
                                     node41.SetAgentType("GameLevelCommon");
     #endif
                                     node29.AddChild(node41);
                                     node29.SetHasEvents(node29.HasEvents() | node41.HasEvents());
                                 }
                                 {
                                     Action_bt_Level_DeathMatch_1_node35 node35 = new Action_bt_Level_DeathMatch_1_node35();
                                     node35.SetClassNameString("Action");
                                     node35.SetId(35);
     #if !BEHAVIAC_RELEASE
                                     node35.SetAgentType("GameLevelCommon");
     #endif
                                     node29.AddChild(node35);
                                     node29.SetHasEvents(node29.HasEvents() | node35.HasEvents());
                                 }
                                 node21.SetHasEvents(node21.HasEvents() | node29.HasEvents());
                             }
                             node11.SetHasEvents(node11.HasEvents() | node21.HasEvents());
                         }
                         {
                             Compute_bt_Level_DeathMatch_1_node0 node0 = new Compute_bt_Level_DeathMatch_1_node0();
                             node0.SetClassNameString("Compute");
                             node0.SetId(0);
     #if !BEHAVIAC_RELEASE
                             node0.SetAgentType("GameLevelCommon");
     #endif
                             node11.AddChild(node0);
                             node11.SetHasEvents(node11.HasEvents() | node0.HasEvents());
                         }
                         node14.SetHasEvents(node14.HasEvents() | node11.HasEvents());
                     }
                     {
                         Selector node2 = new Selector();
                         node2.SetClassNameString("Selector");
                         node2.SetId(2);
     #if !BEHAVIAC_RELEASE
                         node2.SetAgentType("GameLevelCommon");
     #endif
                         node14.AddChild(node2);
                         {
                             Sequence node38 = new Sequence();
                             node38.SetClassNameString("Sequence");
                             node38.SetId(38);
     #if !BEHAVIAC_RELEASE
                             node38.SetAgentType("GameLevelCommon");
     #endif
                             node2.AddChild(node38);
                             {
                                 Action_bt_Level_DeathMatch_1_node5 node5 = new Action_bt_Level_DeathMatch_1_node5();
                                 node5.SetClassNameString("Action");
                                 node5.SetId(5);
     #if !BEHAVIAC_RELEASE
                                 node5.SetAgentType("GameLevelCommon");
     #endif
                                 node38.AddChild(node5);
                                 node38.SetHasEvents(node38.HasEvents() | node5.HasEvents());
                             }
                             {
                                 Wait_bt_Level_DeathMatch_1_node1 node1 = new Wait_bt_Level_DeathMatch_1_node1();
                                 node1.SetClassNameString("Wait");
                                 node1.SetId(1);
     #if !BEHAVIAC_RELEASE
                                 node1.SetAgentType("GameLevelCommon");
     #endif
                                 node38.AddChild(node1);
                                 node38.SetHasEvents(node38.HasEvents() | node1.HasEvents());
                             }
                             {
                                 Action_bt_Level_DeathMatch_1_node30 node30 = new Action_bt_Level_DeathMatch_1_node30();
                                 node30.SetClassNameString("Action");
                                 node30.SetId(30);
     #if !BEHAVIAC_RELEASE
                                 node30.SetAgentType("GameLevelCommon");
     #endif
                                 node38.AddChild(node30);
                                 node38.SetHasEvents(node38.HasEvents() | node30.HasEvents());
                             }
                             {
                                 Wait_bt_Level_DeathMatch_1_node32 node32 = new Wait_bt_Level_DeathMatch_1_node32();
                                 node32.SetClassNameString("Wait");
                                 node32.SetId(32);
     #if !BEHAVIAC_RELEASE
                                 node32.SetAgentType("GameLevelCommon");
     #endif
                                 node38.AddChild(node32);
                                 node38.SetHasEvents(node38.HasEvents() | node32.HasEvents());
                             }
                             {
                                 Action_bt_Level_DeathMatch_1_node23 node23 = new Action_bt_Level_DeathMatch_1_node23();
                                 node23.SetClassNameString("Action");
                                 node23.SetId(23);
     #if !BEHAVIAC_RELEASE
                                 node23.SetAgentType("GameLevelCommon");
     #endif
                                 node38.AddChild(node23);
                                 node38.SetHasEvents(node38.HasEvents() | node23.HasEvents());
                             }
                             node2.SetHasEvents(node2.HasEvents() | node38.HasEvents());
                         }
                         {
                             Sequence node24 = new Sequence();
                             node24.SetClassNameString("Sequence");
                             node24.SetId(24);
     #if !BEHAVIAC_RELEASE
                             node24.SetAgentType("GameLevelCommon");
     #endif
                             node2.AddChild(node24);
                             {
                                 Action_bt_Level_DeathMatch_1_node22 node22 = new Action_bt_Level_DeathMatch_1_node22();
                                 node22.SetClassNameString("Action");
                                 node22.SetId(22);
     #if !BEHAVIAC_RELEASE
                                 node22.SetAgentType("GameLevelCommon");
     #endif
                                 node24.AddChild(node22);
                                 node24.SetHasEvents(node24.HasEvents() | node22.HasEvents());
                             }
                             {
                                 Wait_bt_Level_DeathMatch_1_node28 node28 = new Wait_bt_Level_DeathMatch_1_node28();
                                 node28.SetClassNameString("Wait");
                                 node28.SetId(28);
     #if !BEHAVIAC_RELEASE
                                 node28.SetAgentType("GameLevelCommon");
     #endif
                                 node24.AddChild(node28);
                                 node24.SetHasEvents(node24.HasEvents() | node28.HasEvents());
                             }
                             {
                                 Action_bt_Level_DeathMatch_1_node33 node33 = new Action_bt_Level_DeathMatch_1_node33();
                                 node33.SetClassNameString("Action");
                                 node33.SetId(33);
     #if !BEHAVIAC_RELEASE
                                 node33.SetAgentType("GameLevelCommon");
     #endif
                                 node24.AddChild(node33);
                                 node24.SetHasEvents(node24.HasEvents() | node33.HasEvents());
                             }
                             {
                                 Wait_bt_Level_DeathMatch_1_node56 node56 = new Wait_bt_Level_DeathMatch_1_node56();
                                 node56.SetClassNameString("Wait");
                                 node56.SetId(56);
     #if !BEHAVIAC_RELEASE
                                 node56.SetAgentType("GameLevelCommon");
     #endif
                                 node24.AddChild(node56);
                                 node24.SetHasEvents(node24.HasEvents() | node56.HasEvents());
                             }
                             {
                                 Action_bt_Level_DeathMatch_1_node27 node27 = new Action_bt_Level_DeathMatch_1_node27();
                                 node27.SetClassNameString("Action");
                                 node27.SetId(27);
     #if !BEHAVIAC_RELEASE
                                 node27.SetAgentType("GameLevelCommon");
     #endif
                                 node24.AddChild(node27);
                                 node24.SetHasEvents(node24.HasEvents() | node27.HasEvents());
                             }
                             node2.SetHasEvents(node2.HasEvents() | node24.HasEvents());
                         }
                         node14.SetHasEvents(node14.HasEvents() | node2.HasEvents());
                     }
                     {
                         Sequence node34 = new Sequence();
                         node34.SetClassNameString("Sequence");
                         node34.SetId(34);
     #if !BEHAVIAC_RELEASE
                         node34.SetAgentType("GameLevelCommon");
     #endif
                         node14.AddChild(node34);
                         {
                             Wait_bt_Level_DeathMatch_1_node31 node31 = new Wait_bt_Level_DeathMatch_1_node31();
                             node31.SetClassNameString("Wait");
                             node31.SetId(31);
     #if !BEHAVIAC_RELEASE
                             node31.SetAgentType("GameLevelCommon");
     #endif
                             node34.AddChild(node31);
                             node34.SetHasEvents(node34.HasEvents() | node31.HasEvents());
                         }
                         {
                             Assignment_bt_Level_DeathMatch_1_node42 node42 = new Assignment_bt_Level_DeathMatch_1_node42();
                             node42.SetClassNameString("Assignment");
                             node42.SetId(42);
     #if !BEHAVIAC_RELEASE
                             node42.SetAgentType("GameLevelCommon");
     #endif
                             node34.AddChild(node42);
                             node34.SetHasEvents(node34.HasEvents() | node42.HasEvents());
                         }
                         {
                             Assignment_bt_Level_DeathMatch_1_node43 node43 = new Assignment_bt_Level_DeathMatch_1_node43();
                             node43.SetClassNameString("Assignment");
                             node43.SetId(43);
     #if !BEHAVIAC_RELEASE
                             node43.SetAgentType("GameLevelCommon");
     #endif
                             node34.AddChild(node43);
                             node34.SetHasEvents(node34.HasEvents() | node43.HasEvents());
                         }
                         {
                             Assignment_bt_Level_DeathMatch_1_node44 node44 = new Assignment_bt_Level_DeathMatch_1_node44();
                             node44.SetClassNameString("Assignment");
                             node44.SetId(44);
     #if !BEHAVIAC_RELEASE
                             node44.SetAgentType("GameLevelCommon");
     #endif
                             node34.AddChild(node44);
                             node34.SetHasEvents(node34.HasEvents() | node44.HasEvents());
                         }
                         {
                             Action_bt_Level_DeathMatch_1_node45 node45 = new Action_bt_Level_DeathMatch_1_node45();
                             node45.SetClassNameString("Action");
                             node45.SetId(45);
     #if !BEHAVIAC_RELEASE
                             node45.SetAgentType("GameLevelCommon");
     #endif
                             node34.AddChild(node45);
                             node34.SetHasEvents(node34.HasEvents() | node45.HasEvents());
                         }
                         {
                             Wait_bt_Level_DeathMatch_1_node46 node46 = new Wait_bt_Level_DeathMatch_1_node46();
                             node46.SetClassNameString("Wait");
                             node46.SetId(46);
     #if !BEHAVIAC_RELEASE
                             node46.SetAgentType("GameLevelCommon");
     #endif
                             node34.AddChild(node46);
                             node34.SetHasEvents(node34.HasEvents() | node46.HasEvents());
                         }
                         node14.SetHasEvents(node14.HasEvents() | node34.HasEvents());
                     }
                     node50.SetHasEvents(node50.HasEvents() | node14.HasEvents());
                 }
                 node6.SetHasEvents(node6.HasEvents() | node50.HasEvents());
             }
             node3.SetHasEvents(node3.HasEvents() | node6.HasEvents());
         }
         bt.SetHasEvents(bt.HasEvents() | node3.HasEvents());
     }
     return true;
 }
コード例 #18
0
        public static bool build_behavior_tree(BehaviorTree bt)
        {
            bt.SetClassNameString("BehaviorTree");
            bt.SetId(-1);
            bt.SetName("SelectBT");
            bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
            bt.SetAgentType("FirstAgent");
#endif
            // children
            {
                Sequence node0 = new Sequence();
                node0.SetClassNameString("Sequence");
                node0.SetId(0);
#if !BEHAVIAC_RELEASE
                node0.SetAgentType("FirstAgent");
#endif
                bt.AddChild(node0);
                {
                    Assignment_bt_SelectBT_node1 node1 = new Assignment_bt_SelectBT_node1();
                    node1.SetClassNameString("Assignment");
                    node1.SetId(1);
#if !BEHAVIAC_RELEASE
                    node1.SetAgentType("FirstAgent");
#endif
                    node0.AddChild(node1);
                    node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
                }
                {
                    Selector node2 = new Selector();
                    node2.SetClassNameString("Selector");
                    node2.SetId(2);
#if !BEHAVIAC_RELEASE
                    node2.SetAgentType("FirstAgent");
#endif
                    node0.AddChild(node2);
                    {
                        Condition_bt_SelectBT_node3 node3 = new Condition_bt_SelectBT_node3();
                        node3.SetClassNameString("Condition");
                        node3.SetId(3);
#if !BEHAVIAC_RELEASE
                        node3.SetAgentType("FirstAgent");
#endif
                        node2.AddChild(node3);
                        node2.SetHasEvents(node2.HasEvents() | node3.HasEvents());
                    }
                    {
                        Action_bt_SelectBT_node4 node4 = new Action_bt_SelectBT_node4();
                        node4.SetClassNameString("Action");
                        node4.SetId(4);
#if !BEHAVIAC_RELEASE
                        node4.SetAgentType("FirstAgent");
#endif
                        node2.AddChild(node4);
                        node2.SetHasEvents(node2.HasEvents() | node4.HasEvents());
                    }
                    node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
                }
                bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
            }
            return(true);
        }
コード例 #19
0
ファイル: generated_behaviors.cs プロジェクト: nusus/behaviac
 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;
 }