コード例 #1
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/action_ut_waitforsignal_2");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// children
			{
				Sequence node0 = new Sequence();
				node0.SetClassNameString("Sequence");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("AgentNodeTest");
#endif
				bt.AddChild(node0);
				{
					WaitforSignal node1 = new WaitforSignal();
					node1.SetClassNameString("WaitforSignal");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node1);
					{
						Or node2 = new Or();
						node2.SetClassNameString("Or");
						node2.SetId(2);
#if !BEHAVIAC_RELEASE
						node2.SetAgentType("AgentNodeTest");
#endif
						node1.SetCustomCondition(node2);
						{
							And node3 = new And();
							node3.SetClassNameString("And");
							node3.SetId(3);
#if !BEHAVIAC_RELEASE
							node3.SetAgentType("AgentNodeTest");
#endif
							node2.AddChild(node3);
							{
								Condition_bt_node_test_action_ut_waitforsignal_2_node5 node5 = new Condition_bt_node_test_action_ut_waitforsignal_2_node5();
								node5.SetClassNameString("Condition");
								node5.SetId(5);
#if !BEHAVIAC_RELEASE
								node5.SetAgentType("AgentNodeTest");
#endif
								node3.AddChild(node5);
								node3.SetHasEvents(node3.HasEvents() | node5.HasEvents());
							}
							{
								Condition_bt_node_test_action_ut_waitforsignal_2_node6 node6 = new Condition_bt_node_test_action_ut_waitforsignal_2_node6();
								node6.SetClassNameString("Condition");
								node6.SetId(6);
#if !BEHAVIAC_RELEASE
								node6.SetAgentType("AgentNodeTest");
#endif
								node3.AddChild(node6);
								node3.SetHasEvents(node3.HasEvents() | node6.HasEvents());
							}
							node2.SetHasEvents(node2.HasEvents() | node3.HasEvents());
						}
						{
							Condition_bt_node_test_action_ut_waitforsignal_2_node7 node7 = new Condition_bt_node_test_action_ut_waitforsignal_2_node7();
							node7.SetClassNameString("Condition");
							node7.SetId(7);
#if !BEHAVIAC_RELEASE
							node7.SetAgentType("AgentNodeTest");
#endif
							node2.AddChild(node7);
							node2.SetHasEvents(node2.HasEvents() | node7.HasEvents());
						}
						node1.SetHasEvents(node1.HasEvents() | node2.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Assignment_bt_node_test_action_ut_waitforsignal_2_node4 node4 = new Assignment_bt_node_test_action_ut_waitforsignal_2_node4();
					node4.SetClassNameString("Assignment");
					node4.SetId(4);
#if !BEHAVIAC_RELEASE
					node4.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node4);
					node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
コード例 #2
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/event_ut_2");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("ChildNodeTest");
#endif
			// children
			{
				Sequence node0 = new Sequence();
				node0.SetClassNameString("Sequence");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("ChildNodeTest");
#endif
				// attachments
				{
					Event_bt_node_test_event_ut_2_attach1 attach1 = new Event_bt_node_test_event_ut_2_attach1();
					attach1.SetClassNameString("Event");
					attach1.SetId(1);
#if !BEHAVIAC_RELEASE
					attach1.SetAgentType("ChildNodeTest");
#endif
					node0.Attach(attach1, false, false, false);
					node0.SetHasEvents(node0.HasEvents() | (attach1 is Event));
				}
				bt.AddChild(node0);
				{
					WaitforSignal node5 = new WaitforSignal();
					node5.SetClassNameString("WaitforSignal");
					node5.SetId(5);
#if !BEHAVIAC_RELEASE
					node5.SetAgentType("ChildNodeTest");
#endif
					node0.AddChild(node5);
					{
						Condition_bt_node_test_event_ut_2_node6 node6 = new Condition_bt_node_test_event_ut_2_node6();
						node6.SetClassNameString("Condition");
						node6.SetId(6);
#if !BEHAVIAC_RELEASE
						node6.SetAgentType("ChildNodeTest");
#endif
						node5.SetCustomCondition(node6);
						node5.SetHasEvents(node5.HasEvents() | node6.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node5.HasEvents());
				}
				{
					Action_bt_node_test_event_ut_2_node7 node7 = new Action_bt_node_test_event_ut_2_node7();
					node7.SetClassNameString("Action");
					node7.SetId(7);
#if !BEHAVIAC_RELEASE
					node7.SetAgentType("ChildNodeTest");
#endif
					node0.AddChild(node7);
					node0.SetHasEvents(node0.HasEvents() | node7.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
コード例 #3
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/enter_exit_action_ut_2");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// children
			{
				Parallel_bt_node_test_enter_exit_action_ut_2_node0 node0 = new Parallel_bt_node_test_enter_exit_action_ut_2_node0();
				node0.SetClassNameString("Parallel");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("AgentNodeTest");
#endif
				// attachments
				{
					Precondition_bt_node_test_enter_exit_action_ut_2_attach1 attach1 = new Precondition_bt_node_test_enter_exit_action_ut_2_attach1();
					attach1.SetClassNameString("Precondition");
					attach1.SetId(1);
#if !BEHAVIAC_RELEASE
					attach1.SetAgentType("AgentNodeTest");
#endif
					node0.Attach(attach1, true, false, false);
				}
				{
					Effector_bt_node_test_enter_exit_action_ut_2_attach2 attach2 = new Effector_bt_node_test_enter_exit_action_ut_2_attach2();
					attach2.SetClassNameString("Effector");
					attach2.SetId(2);
#if !BEHAVIAC_RELEASE
					attach2.SetAgentType("AgentNodeTest");
#endif
					node0.Attach(attach2, false, true, false);
				}
				bt.AddChild(node0);
				{
					WaitforSignal node3 = new WaitforSignal();
					node3.SetClassNameString("WaitforSignal");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("AgentNodeTest");
#endif
					// attachments
					{
						Precondition_bt_node_test_enter_exit_action_ut_2_attach4 attach4 = new Precondition_bt_node_test_enter_exit_action_ut_2_attach4();
						attach4.SetClassNameString("Precondition");
						attach4.SetId(4);
#if !BEHAVIAC_RELEASE
						attach4.SetAgentType("AgentNodeTest");
#endif
						node3.Attach(attach4, true, false, false);
					}
					{
						Effector_bt_node_test_enter_exit_action_ut_2_attach5 attach5 = new Effector_bt_node_test_enter_exit_action_ut_2_attach5();
						attach5.SetClassNameString("Effector");
						attach5.SetId(5);
#if !BEHAVIAC_RELEASE
						attach5.SetAgentType("AgentNodeTest");
#endif
						node3.Attach(attach5, false, true, false);
					}
					node0.AddChild(node3);
					{
						Condition_bt_node_test_enter_exit_action_ut_2_node8 node8 = new Condition_bt_node_test_enter_exit_action_ut_2_node8();
						node8.SetClassNameString("Condition");
						node8.SetId(8);
#if !BEHAVIAC_RELEASE
						node8.SetAgentType("AgentNodeTest");
#endif
						node3.SetCustomCondition(node8);
						node3.SetHasEvents(node3.HasEvents() | node8.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
				}
				{
					Action_bt_node_test_enter_exit_action_ut_2_node9 node9 = new Action_bt_node_test_enter_exit_action_ut_2_node9();
					node9.SetClassNameString("Action");
					node9.SetId(9);
#if !BEHAVIAC_RELEASE
					node9.SetAgentType("AgentNodeTest");
#endif
					// attachments
					{
						Precondition_bt_node_test_enter_exit_action_ut_2_attach6 attach6 = new Precondition_bt_node_test_enter_exit_action_ut_2_attach6();
						attach6.SetClassNameString("Precondition");
						attach6.SetId(6);
#if !BEHAVIAC_RELEASE
						attach6.SetAgentType("AgentNodeTest");
#endif
						node9.Attach(attach6, true, false, false);
					}
					{
						Effector_bt_node_test_enter_exit_action_ut_2_attach7 attach7 = new Effector_bt_node_test_enter_exit_action_ut_2_attach7();
						attach7.SetClassNameString("Effector");
						attach7.SetId(7);
#if !BEHAVIAC_RELEASE
						attach7.SetAgentType("AgentNodeTest");
#endif
						node9.Attach(attach7, false, true, false);
					}
					node0.AddChild(node9);
					node0.SetHasEvents(node0.HasEvents() | node9.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
コード例 #4
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;
		}
コード例 #5
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("Level_DeathMatch_0");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("GameLevelCommon");
#endif
			// pars
			bt.AddPar("GameLevelCommon", "int", "parT_SpawnCountPerWave", "0");
			bt.AddPar("GameLevelCommon", "int", "parT_WaveCount", "10");
			bt.AddPar("GameLevelCommon", "int", "parT_AwardType", "0");
			bt.AddPar("GameLevelCommon", "int", "parT_AwardX", "0");
			bt.AddPar("GameLevelCommon", "int", "parT_AwardY", "0");
			bt.AddPar("GameLevelCommon", "int", "parT_EnemyCount", "0");
			bt.AddPar("GameLevelCommon", "bool", "parT_GameStopped", "false");
			// children
			{
				DecoratorLoop_bt_Level_DeathMatch_0_node1 node1 = new DecoratorLoop_bt_Level_DeathMatch_0_node1();
				node1.SetClassNameString("DecoratorLoop");
				node1.SetId(1);
#if !BEHAVIAC_RELEASE
				node1.SetAgentType("GameLevelCommon");
#endif
				bt.AddChild(node1);
				{
					Parallel_bt_Level_DeathMatch_0_node16 node16 = new Parallel_bt_Level_DeathMatch_0_node16();
					node16.SetClassNameString("Parallel");
					node16.SetId(16);
#if !BEHAVIAC_RELEASE
					node16.SetAgentType("GameLevelCommon");
#endif
					node1.AddChild(node16);
					{
						IfElse node17 = new IfElse();
						node17.SetClassNameString("IfElse");
						node17.SetId(17);
#if !BEHAVIAC_RELEASE
						node17.SetAgentType("GameLevelCommon");
#endif
						node16.AddChild(node17);
						{
							Condition_bt_Level_DeathMatch_0_node11 node11 = new Condition_bt_Level_DeathMatch_0_node11();
							node11.SetClassNameString("Condition");
							node11.SetId(11);
#if !BEHAVIAC_RELEASE
							node11.SetAgentType("GameLevelCommon");
#endif
							node17.AddChild(node11);
							node17.SetHasEvents(node17.HasEvents() | node11.HasEvents());
						}
						{
							Sequence node5 = new Sequence();
							node5.SetClassNameString("Sequence");
							node5.SetId(5);
#if !BEHAVIAC_RELEASE
							node5.SetAgentType("GameLevelCommon");
#endif
							node17.AddChild(node5);
							{
								Wait_bt_Level_DeathMatch_0_node14 node14 = new Wait_bt_Level_DeathMatch_0_node14();
								node14.SetClassNameString("Wait");
								node14.SetId(14);
#if !BEHAVIAC_RELEASE
								node14.SetAgentType("GameLevelCommon");
#endif
								node5.AddChild(node14);
								node5.SetHasEvents(node5.HasEvents() | node14.HasEvents());
							}
							{
								Assignment_bt_Level_DeathMatch_0_node15 node15 = new Assignment_bt_Level_DeathMatch_0_node15();
								node15.SetClassNameString("Assignment");
								node15.SetId(15);
#if !BEHAVIAC_RELEASE
								node15.SetAgentType("GameLevelCommon");
#endif
								node5.AddChild(node15);
								node5.SetHasEvents(node5.HasEvents() | node15.HasEvents());
							}
							{
								DecoratorNot_bt_Level_DeathMatch_0_node12 node12 = new DecoratorNot_bt_Level_DeathMatch_0_node12();
								node12.SetClassNameString("DecoratorNot");
								node12.SetId(12);
#if !BEHAVIAC_RELEASE
								node12.SetAgentType("GameLevelCommon");
#endif
								node5.AddChild(node12);
								{
									DecoratorLoopUntil_bt_Level_DeathMatch_0_node6 node6 = new DecoratorLoopUntil_bt_Level_DeathMatch_0_node6();
									node6.SetClassNameString("DecoratorLoopUntil");
									node6.SetId(6);
#if !BEHAVIAC_RELEASE
									node6.SetAgentType("GameLevelCommon");
#endif
									node12.AddChild(node6);
									{
										Sequence node0 = new Sequence();
										node0.SetClassNameString("Sequence");
										node0.SetId(0);
#if !BEHAVIAC_RELEASE
										node0.SetAgentType("GameLevelCommon");
#endif
										node6.AddChild(node0);
										{
											Condition_bt_Level_DeathMatch_0_node3 node3 = new Condition_bt_Level_DeathMatch_0_node3();
											node3.SetClassNameString("Condition");
											node3.SetId(3);
#if !BEHAVIAC_RELEASE
											node3.SetAgentType("GameLevelCommon");
#endif
											node0.AddChild(node3);
											node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
										}
										{
											Action_bt_Level_DeathMatch_0_node10 node10 = new Action_bt_Level_DeathMatch_0_node10();
											node10.SetClassNameString("Action");
											node10.SetId(10);
#if !BEHAVIAC_RELEASE
											node10.SetAgentType("GameLevelCommon");
#endif
											node0.AddChild(node10);
											node0.SetHasEvents(node0.HasEvents() | node10.HasEvents());
										}
										{
											Compute_bt_Level_DeathMatch_0_node8 node8 = new Compute_bt_Level_DeathMatch_0_node8();
											node8.SetClassNameString("Compute");
											node8.SetId(8);
#if !BEHAVIAC_RELEASE
											node8.SetAgentType("GameLevelCommon");
#endif
											node0.AddChild(node8);
											node0.SetHasEvents(node0.HasEvents() | node8.HasEvents());
										}
										{
											Wait_bt_Level_DeathMatch_0_node9 node9 = new Wait_bt_Level_DeathMatch_0_node9();
											node9.SetClassNameString("Wait");
											node9.SetId(9);
#if !BEHAVIAC_RELEASE
											node9.SetAgentType("GameLevelCommon");
#endif
											node0.AddChild(node9);
											node0.SetHasEvents(node0.HasEvents() | node9.HasEvents());
										}
										node6.SetHasEvents(node6.HasEvents() | node0.HasEvents());
									}
									node12.SetHasEvents(node12.HasEvents() | node6.HasEvents());
								}
								node5.SetHasEvents(node5.HasEvents() | node12.HasEvents());
							}
							{
								Wait_bt_Level_DeathMatch_0_node7 node7 = new Wait_bt_Level_DeathMatch_0_node7();
								node7.SetClassNameString("Wait");
								node7.SetId(7);
#if !BEHAVIAC_RELEASE
								node7.SetAgentType("GameLevelCommon");
#endif
								node5.AddChild(node7);
								node5.SetHasEvents(node5.HasEvents() | node7.HasEvents());
							}
							{
								Compute_bt_Level_DeathMatch_0_node2 node2 = new Compute_bt_Level_DeathMatch_0_node2();
								node2.SetClassNameString("Compute");
								node2.SetId(2);
#if !BEHAVIAC_RELEASE
								node2.SetAgentType("GameLevelCommon");
#endif
								node5.AddChild(node2);
								node5.SetHasEvents(node5.HasEvents() | node2.HasEvents());
							}
							node17.SetHasEvents(node17.HasEvents() | node5.HasEvents());
						}
						{
							DecoratorAlwaysSuccess_bt_Level_DeathMatch_0_node4 node4 = new DecoratorAlwaysSuccess_bt_Level_DeathMatch_0_node4();
							node4.SetClassNameString("DecoratorAlwaysSuccess");
							node4.SetId(4);
#if !BEHAVIAC_RELEASE
							node4.SetAgentType("GameLevelCommon");
#endif
							node17.AddChild(node4);
							{
								Sequence node24 = new Sequence();
								node24.SetClassNameString("Sequence");
								node24.SetId(24);
#if !BEHAVIAC_RELEASE
								node24.SetAgentType("GameLevelCommon");
#endif
								node4.AddChild(node24);
								{
									Condition_bt_Level_DeathMatch_0_node28 node28 = new Condition_bt_Level_DeathMatch_0_node28();
									node28.SetClassNameString("Condition");
									node28.SetId(28);
#if !BEHAVIAC_RELEASE
									node28.SetAgentType("GameLevelCommon");
#endif
									node24.AddChild(node28);
									node24.SetHasEvents(node24.HasEvents() | node28.HasEvents());
								}
								{
									Assignment_bt_Level_DeathMatch_0_node25 node25 = new Assignment_bt_Level_DeathMatch_0_node25();
									node25.SetClassNameString("Assignment");
									node25.SetId(25);
#if !BEHAVIAC_RELEASE
									node25.SetAgentType("GameLevelCommon");
#endif
									node24.AddChild(node25);
									node24.SetHasEvents(node24.HasEvents() | node25.HasEvents());
								}
								{
									Condition_bt_Level_DeathMatch_0_node26 node26 = new Condition_bt_Level_DeathMatch_0_node26();
									node26.SetClassNameString("Condition");
									node26.SetId(26);
#if !BEHAVIAC_RELEASE
									node26.SetAgentType("GameLevelCommon");
#endif
									node24.AddChild(node26);
									node24.SetHasEvents(node24.HasEvents() | node26.HasEvents());
								}
								{
									Wait_bt_Level_DeathMatch_0_node30 node30 = new Wait_bt_Level_DeathMatch_0_node30();
									node30.SetClassNameString("Wait");
									node30.SetId(30);
#if !BEHAVIAC_RELEASE
									node30.SetAgentType("GameLevelCommon");
#endif
									node24.AddChild(node30);
									node24.SetHasEvents(node24.HasEvents() | node30.HasEvents());
								}
								{
									Action_bt_Level_DeathMatch_0_node27 node27 = new Action_bt_Level_DeathMatch_0_node27();
									node27.SetClassNameString("Action");
									node27.SetId(27);
#if !BEHAVIAC_RELEASE
									node27.SetAgentType("GameLevelCommon");
#endif
									node24.AddChild(node27);
									node24.SetHasEvents(node24.HasEvents() | node27.HasEvents());
								}
								{
									Assignment_bt_Level_DeathMatch_0_node29 node29 = new Assignment_bt_Level_DeathMatch_0_node29();
									node29.SetClassNameString("Assignment");
									node29.SetId(29);
#if !BEHAVIAC_RELEASE
									node29.SetAgentType("GameLevelCommon");
#endif
									node24.AddChild(node29);
									node24.SetHasEvents(node24.HasEvents() | node29.HasEvents());
								}
								node4.SetHasEvents(node4.HasEvents() | node24.HasEvents());
							}
							node17.SetHasEvents(node17.HasEvents() | node4.HasEvents());
						}
						node16.SetHasEvents(node16.HasEvents() | node17.HasEvents());
					}
					{
						Sequence node13 = new Sequence();
						node13.SetClassNameString("Sequence");
						node13.SetId(13);
#if !BEHAVIAC_RELEASE
						node13.SetAgentType("GameLevelCommon");
#endif
						node16.AddChild(node13);
						{
							Wait_bt_Level_DeathMatch_0_node18 node18 = new Wait_bt_Level_DeathMatch_0_node18();
							node18.SetClassNameString("Wait");
							node18.SetId(18);
#if !BEHAVIAC_RELEASE
							node18.SetAgentType("GameLevelCommon");
#endif
							node13.AddChild(node18);
							node13.SetHasEvents(node13.HasEvents() | node18.HasEvents());
						}
						{
							Assignment_bt_Level_DeathMatch_0_node19 node19 = new Assignment_bt_Level_DeathMatch_0_node19();
							node19.SetClassNameString("Assignment");
							node19.SetId(19);
#if !BEHAVIAC_RELEASE
							node19.SetAgentType("GameLevelCommon");
#endif
							node13.AddChild(node19);
							node13.SetHasEvents(node13.HasEvents() | node19.HasEvents());
						}
						{
							Assignment_bt_Level_DeathMatch_0_node22 node22 = new Assignment_bt_Level_DeathMatch_0_node22();
							node22.SetClassNameString("Assignment");
							node22.SetId(22);
#if !BEHAVIAC_RELEASE
							node22.SetAgentType("GameLevelCommon");
#endif
							node13.AddChild(node22);
							node13.SetHasEvents(node13.HasEvents() | node22.HasEvents());
						}
						{
							Assignment_bt_Level_DeathMatch_0_node23 node23 = new Assignment_bt_Level_DeathMatch_0_node23();
							node23.SetClassNameString("Assignment");
							node23.SetId(23);
#if !BEHAVIAC_RELEASE
							node23.SetAgentType("GameLevelCommon");
#endif
							node13.AddChild(node23);
							node13.SetHasEvents(node13.HasEvents() | node23.HasEvents());
						}
						{
							Action_bt_Level_DeathMatch_0_node20 node20 = new Action_bt_Level_DeathMatch_0_node20();
							node20.SetClassNameString("Action");
							node20.SetId(20);
#if !BEHAVIAC_RELEASE
							node20.SetAgentType("GameLevelCommon");
#endif
							node13.AddChild(node20);
							node13.SetHasEvents(node13.HasEvents() | node20.HasEvents());
						}
						{
							Wait_bt_Level_DeathMatch_0_node21 node21 = new Wait_bt_Level_DeathMatch_0_node21();
							node21.SetClassNameString("Wait");
							node21.SetId(21);
#if !BEHAVIAC_RELEASE
							node21.SetAgentType("GameLevelCommon");
#endif
							node13.AddChild(node21);
							node13.SetHasEvents(node13.HasEvents() | node21.HasEvents());
						}
						node16.SetHasEvents(node16.HasEvents() | node13.HasEvents());
					}
					{
						WaitforSignal node31 = new WaitforSignal();
						node31.SetClassNameString("WaitforSignal");
						node31.SetId(31);
#if !BEHAVIAC_RELEASE
						node31.SetAgentType("GameLevelCommon");
#endif
						node16.AddChild(node31);
						{
							Condition_bt_Level_DeathMatch_0_node32 node32 = new Condition_bt_Level_DeathMatch_0_node32();
							node32.SetClassNameString("Condition");
							node32.SetId(32);
#if !BEHAVIAC_RELEASE
							node32.SetAgentType("GameLevelCommon");
#endif
							node31.SetCustomCondition(node32);
							node31.SetHasEvents(node31.HasEvents() | node32.HasEvents());
						}
						{
							DecoratorAlwaysSuccess_bt_Level_DeathMatch_0_node33 node33 = new DecoratorAlwaysSuccess_bt_Level_DeathMatch_0_node33();
							node33.SetClassNameString("DecoratorAlwaysSuccess");
							node33.SetId(33);
#if !BEHAVIAC_RELEASE
							node33.SetAgentType("GameLevelCommon");
#endif
							node31.AddChild(node33);
							{
								Sequence node34 = new Sequence();
								node34.SetClassNameString("Sequence");
								node34.SetId(34);
#if !BEHAVIAC_RELEASE
								node34.SetAgentType("GameLevelCommon");
#endif
								node33.AddChild(node34);
								{
									Wait_bt_Level_DeathMatch_0_node35 node35 = new Wait_bt_Level_DeathMatch_0_node35();
									node35.SetClassNameString("Wait");
									node35.SetId(35);
#if !BEHAVIAC_RELEASE
									node35.SetAgentType("GameLevelCommon");
#endif
									node34.AddChild(node35);
									node34.SetHasEvents(node34.HasEvents() | node35.HasEvents());
								}
								{
									Action_bt_Level_DeathMatch_0_node37 node37 = new Action_bt_Level_DeathMatch_0_node37();
									node37.SetClassNameString("Action");
									node37.SetId(37);
#if !BEHAVIAC_RELEASE
									node37.SetAgentType("GameLevelCommon");
#endif
									node34.AddChild(node37);
									node34.SetHasEvents(node34.HasEvents() | node37.HasEvents());
								}
								node33.SetHasEvents(node33.HasEvents() | node34.HasEvents());
							}
							node31.SetHasEvents(node31.HasEvents() | node33.HasEvents());
						}
						node16.SetHasEvents(node16.HasEvents() | node31.HasEvents());
					}
					node1.SetHasEvents(node1.HasEvents() | node16.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node1.HasEvents());
			}
			return true;
		}
コード例 #6
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("Level_Survival");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("GameLevelCommon");
#endif
			// pars
			bt.AddPar("GameLevelCommon", "int", "parT_EnemyCount", "0");
			bt.AddPar("GameLevelCommon", "int", "parT_AwardType", "0");
			bt.AddPar("GameLevelCommon", "float", "parT_rotateSpeed", "0");
			bt.AddPar("GameLevelCommon", "int", "parT_PlayerLifeCount", "0");
			bt.AddPar("GameLevelCommon", "int", "parT_PlayerID", "1");
			bt.AddPar("GameLevelCommon", "bool", "parT_GameStopped", "false");
			// children
			{
				Sequence node23 = new Sequence();
				node23.SetClassNameString("Sequence");
				node23.SetId(23);
#if !BEHAVIAC_RELEASE
				node23.SetAgentType("GameLevelCommon");
#endif
				bt.AddChild(node23);
				{
					Assignment_bt_Level_Survival_node36 node36 = new Assignment_bt_Level_Survival_node36();
					node36.SetClassNameString("Assignment");
					node36.SetId(36);
#if !BEHAVIAC_RELEASE
					node36.SetAgentType("GameLevelCommon");
#endif
					node23.AddChild(node36);
					node23.SetHasEvents(node23.HasEvents() | node36.HasEvents());
				}
				{
					Action_bt_Level_Survival_node28 node28 = new Action_bt_Level_Survival_node28();
					node28.SetClassNameString("Action");
					node28.SetId(28);
#if !BEHAVIAC_RELEASE
					node28.SetAgentType("GameLevelCommon");
#endif
					node23.AddChild(node28);
					node23.SetHasEvents(node23.HasEvents() | node28.HasEvents());
				}
				{
					DecoratorLoop_bt_Level_Survival_node27 node27 = new DecoratorLoop_bt_Level_Survival_node27();
					node27.SetClassNameString("DecoratorLoop");
					node27.SetId(27);
#if !BEHAVIAC_RELEASE
					node27.SetAgentType("GameLevelCommon");
#endif
					node23.AddChild(node27);
					{
						Parallel_bt_Level_Survival_node0 node0 = new Parallel_bt_Level_Survival_node0();
						node0.SetClassNameString("Parallel");
						node0.SetId(0);
#if !BEHAVIAC_RELEASE
						node0.SetAgentType("GameLevelCommon");
#endif
						node27.AddChild(node0);
						{
							Sequence node5 = new Sequence();
							node5.SetClassNameString("Sequence");
							node5.SetId(5);
#if !BEHAVIAC_RELEASE
							node5.SetAgentType("GameLevelCommon");
#endif
							node0.AddChild(node5);
							{
								Wait_bt_Level_Survival_node6 node6 = new Wait_bt_Level_Survival_node6();
								node6.SetClassNameString("Wait");
								node6.SetId(6);
#if !BEHAVIAC_RELEASE
								node6.SetAgentType("GameLevelCommon");
#endif
								node5.AddChild(node6);
								node5.SetHasEvents(node5.HasEvents() | node6.HasEvents());
							}
							{
								Assignment_bt_Level_Survival_node1 node1 = new Assignment_bt_Level_Survival_node1();
								node1.SetClassNameString("Assignment");
								node1.SetId(1);
#if !BEHAVIAC_RELEASE
								node1.SetAgentType("GameLevelCommon");
#endif
								node5.AddChild(node1);
								node5.SetHasEvents(node5.HasEvents() | node1.HasEvents());
							}
							{
								Action_bt_Level_Survival_node17 node17 = new Action_bt_Level_Survival_node17();
								node17.SetClassNameString("Action");
								node17.SetId(17);
#if !BEHAVIAC_RELEASE
								node17.SetAgentType("GameLevelCommon");
#endif
								node5.AddChild(node17);
								node5.SetHasEvents(node5.HasEvents() | node17.HasEvents());
							}
							{
								Wait_bt_Level_Survival_node2 node2 = new Wait_bt_Level_Survival_node2();
								node2.SetClassNameString("Wait");
								node2.SetId(2);
#if !BEHAVIAC_RELEASE
								node2.SetAgentType("GameLevelCommon");
#endif
								node5.AddChild(node2);
								node5.SetHasEvents(node5.HasEvents() | node2.HasEvents());
							}
							node0.SetHasEvents(node0.HasEvents() | node5.HasEvents());
						}
						{
							Sequence node3 = new Sequence();
							node3.SetClassNameString("Sequence");
							node3.SetId(3);
#if !BEHAVIAC_RELEASE
							node3.SetAgentType("GameLevelCommon");
#endif
							node0.AddChild(node3);
							{
								Assignment_bt_Level_Survival_node9 node9 = new Assignment_bt_Level_Survival_node9();
								node9.SetClassNameString("Assignment");
								node9.SetId(9);
#if !BEHAVIAC_RELEASE
								node9.SetAgentType("GameLevelCommon");
#endif
								node3.AddChild(node9);
								node3.SetHasEvents(node3.HasEvents() | node9.HasEvents());
							}
							{
								Condition_bt_Level_Survival_node11 node11 = new Condition_bt_Level_Survival_node11();
								node11.SetClassNameString("Condition");
								node11.SetId(11);
#if !BEHAVIAC_RELEASE
								node11.SetAgentType("GameLevelCommon");
#endif
								node3.AddChild(node11);
								node3.SetHasEvents(node3.HasEvents() | node11.HasEvents());
							}
							{
								Action_bt_Level_Survival_node18 node18 = new Action_bt_Level_Survival_node18();
								node18.SetClassNameString("Action");
								node18.SetId(18);
#if !BEHAVIAC_RELEASE
								node18.SetAgentType("GameLevelCommon");
#endif
								node3.AddChild(node18);
								node3.SetHasEvents(node3.HasEvents() | node18.HasEvents());
							}
							{
								Wait_bt_Level_Survival_node10 node10 = new Wait_bt_Level_Survival_node10();
								node10.SetClassNameString("Wait");
								node10.SetId(10);
#if !BEHAVIAC_RELEASE
								node10.SetAgentType("GameLevelCommon");
#endif
								node3.AddChild(node10);
								node3.SetHasEvents(node3.HasEvents() | node10.HasEvents());
							}
							node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
						}
						{
							WaitforSignal node13 = new WaitforSignal();
							node13.SetClassNameString("WaitforSignal");
							node13.SetId(13);
#if !BEHAVIAC_RELEASE
							node13.SetAgentType("GameLevelCommon");
#endif
							node0.AddChild(node13);
							{
								Condition_bt_Level_Survival_node8 node8 = new Condition_bt_Level_Survival_node8();
								node8.SetClassNameString("Condition");
								node8.SetId(8);
#if !BEHAVIAC_RELEASE
								node8.SetAgentType("GameLevelCommon");
#endif
								node13.SetCustomCondition(node8);
								node13.SetHasEvents(node13.HasEvents() | node8.HasEvents());
							}
							{
								DecoratorAlwaysSuccess_bt_Level_Survival_node20 node20 = new DecoratorAlwaysSuccess_bt_Level_Survival_node20();
								node20.SetClassNameString("DecoratorAlwaysSuccess");
								node20.SetId(20);
#if !BEHAVIAC_RELEASE
								node20.SetAgentType("GameLevelCommon");
#endif
								node13.AddChild(node20);
								{
									Sequence node25 = new Sequence();
									node25.SetClassNameString("Sequence");
									node25.SetId(25);
#if !BEHAVIAC_RELEASE
									node25.SetAgentType("GameLevelCommon");
#endif
									node20.AddChild(node25);
									{
										Wait_bt_Level_Survival_node26 node26 = new Wait_bt_Level_Survival_node26();
										node26.SetClassNameString("Wait");
										node26.SetId(26);
#if !BEHAVIAC_RELEASE
										node26.SetAgentType("GameLevelCommon");
#endif
										node25.AddChild(node26);
										node25.SetHasEvents(node25.HasEvents() | node26.HasEvents());
									}
									{
										Assignment_bt_Level_Survival_node24 node24 = new Assignment_bt_Level_Survival_node24();
										node24.SetClassNameString("Assignment");
										node24.SetId(24);
#if !BEHAVIAC_RELEASE
										node24.SetAgentType("GameLevelCommon");
#endif
										node25.AddChild(node24);
										node25.SetHasEvents(node25.HasEvents() | node24.HasEvents());
									}
									{
										Condition_bt_Level_Survival_node21 node21 = new Condition_bt_Level_Survival_node21();
										node21.SetClassNameString("Condition");
										node21.SetId(21);
#if !BEHAVIAC_RELEASE
										node21.SetAgentType("GameLevelCommon");
#endif
										node25.AddChild(node21);
										node25.SetHasEvents(node25.HasEvents() | node21.HasEvents());
									}
									{
										Action_bt_Level_Survival_node22 node22 = new Action_bt_Level_Survival_node22();
										node22.SetClassNameString("Action");
										node22.SetId(22);
#if !BEHAVIAC_RELEASE
										node22.SetAgentType("GameLevelCommon");
#endif
										node25.AddChild(node22);
										node25.SetHasEvents(node25.HasEvents() | node22.HasEvents());
									}
									{
										Compute_bt_Level_Survival_node38 node38 = new Compute_bt_Level_Survival_node38();
										node38.SetClassNameString("Compute");
										node38.SetId(38);
#if !BEHAVIAC_RELEASE
										node38.SetAgentType("GameLevelCommon");
#endif
										node25.AddChild(node38);
										node25.SetHasEvents(node25.HasEvents() | node38.HasEvents());
									}
									{
										Action_bt_Level_Survival_node39 node39 = new Action_bt_Level_Survival_node39();
										node39.SetClassNameString("Action");
										node39.SetId(39);
#if !BEHAVIAC_RELEASE
										node39.SetAgentType("GameLevelCommon");
#endif
										node25.AddChild(node39);
										node25.SetHasEvents(node25.HasEvents() | node39.HasEvents());
									}
									node20.SetHasEvents(node20.HasEvents() | node25.HasEvents());
								}
								node13.SetHasEvents(node13.HasEvents() | node20.HasEvents());
							}
							node0.SetHasEvents(node0.HasEvents() | node13.HasEvents());
						}
						{
							Sequence node29 = new Sequence();
							node29.SetClassNameString("Sequence");
							node29.SetId(29);
#if !BEHAVIAC_RELEASE
							node29.SetAgentType("GameLevelCommon");
#endif
							node0.AddChild(node29);
							{
								And node30 = new And();
								node30.SetClassNameString("And");
								node30.SetId(30);
#if !BEHAVIAC_RELEASE
								node30.SetAgentType("GameLevelCommon");
#endif
								node29.AddChild(node30);
								{
									Condition_bt_Level_Survival_node31 node31 = new Condition_bt_Level_Survival_node31();
									node31.SetClassNameString("Condition");
									node31.SetId(31);
#if !BEHAVIAC_RELEASE
									node31.SetAgentType("GameLevelCommon");
#endif
									node30.AddChild(node31);
									node30.SetHasEvents(node30.HasEvents() | node31.HasEvents());
								}
								{
									Condition_bt_Level_Survival_node32 node32 = new Condition_bt_Level_Survival_node32();
									node32.SetClassNameString("Condition");
									node32.SetId(32);
#if !BEHAVIAC_RELEASE
									node32.SetAgentType("GameLevelCommon");
#endif
									node30.AddChild(node32);
									node30.SetHasEvents(node30.HasEvents() | node32.HasEvents());
								}
								{
									Condition_bt_Level_Survival_node34 node34 = new Condition_bt_Level_Survival_node34();
									node34.SetClassNameString("Condition");
									node34.SetId(34);
#if !BEHAVIAC_RELEASE
									node34.SetAgentType("GameLevelCommon");
#endif
									node30.AddChild(node34);
									node30.SetHasEvents(node30.HasEvents() | node34.HasEvents());
								}
								node29.SetHasEvents(node29.HasEvents() | node30.HasEvents());
							}
							{
								Wait_bt_Level_Survival_node37 node37 = new Wait_bt_Level_Survival_node37();
								node37.SetClassNameString("Wait");
								node37.SetId(37);
#if !BEHAVIAC_RELEASE
								node37.SetAgentType("GameLevelCommon");
#endif
								node29.AddChild(node37);
								node29.SetHasEvents(node29.HasEvents() | node37.HasEvents());
							}
							{
								Action_bt_Level_Survival_node7 node7 = new Action_bt_Level_Survival_node7();
								node7.SetClassNameString("Action");
								node7.SetId(7);
#if !BEHAVIAC_RELEASE
								node7.SetAgentType("GameLevelCommon");
#endif
								node29.AddChild(node7);
								node29.SetHasEvents(node29.HasEvents() | node7.HasEvents());
							}
							{
								Wait_bt_Level_Survival_node4 node4 = new Wait_bt_Level_Survival_node4();
								node4.SetClassNameString("Wait");
								node4.SetId(4);
#if !BEHAVIAC_RELEASE
								node4.SetAgentType("GameLevelCommon");
#endif
								node29.AddChild(node4);
								node29.SetHasEvents(node29.HasEvents() | node4.HasEvents());
							}
							{
								Action_bt_Level_Survival_node33 node33 = new Action_bt_Level_Survival_node33();
								node33.SetClassNameString("Action");
								node33.SetId(33);
#if !BEHAVIAC_RELEASE
								node33.SetAgentType("GameLevelCommon");
#endif
								node29.AddChild(node33);
								node29.SetHasEvents(node29.HasEvents() | node33.HasEvents());
							}
							{
								Assignment_bt_Level_Survival_node35 node35 = new Assignment_bt_Level_Survival_node35();
								node35.SetClassNameString("Assignment");
								node35.SetId(35);
#if !BEHAVIAC_RELEASE
								node35.SetAgentType("GameLevelCommon");
#endif
								node29.AddChild(node35);
								node29.SetHasEvents(node29.HasEvents() | node35.HasEvents());
							}
							node0.SetHasEvents(node0.HasEvents() | node29.HasEvents());
						}
						node27.SetHasEvents(node27.HasEvents() | node0.HasEvents());
					}
					node23.SetHasEvents(node23.HasEvents() | node27.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node23.HasEvents());
			}
			return true;
		}