public static bool build_behavior_tree(BehaviorTree bt)
        {
            bt.SetClassNameString("BehaviorTree");
            bt.SetId(-1);
            bt.SetName("WrapperAI/CrystalBehavior");
            bt.AddPar("Assets.Scripts.GameLogic.SkillSlotType", "p_curSlotType", "SLOT_SKILL_0", string.Empty);
            bt.AddPar("uint", "p_enemyID", "0", string.Empty);
            bt.AddPar("int", "p_srchRange", "0", string.Empty);
            bt.AddPar("UnityEngine.Vector3", "p_AttackMoveDest", "{kEpsilon=0;x=0;y=0;z=0;}", string.Empty);
            bt.AddPar("bool", "p_IsAttackMove_Attack", "false", string.Empty);
            bt.AddPar("bool", "p_AttackIsFinished", "true", string.Empty);
            bt.AddPar("uint", "p_CmdID", "0", string.Empty);
            DecoratorLoop_bt_WrapperAI_CrystalBehavior_node14 decoratorLoop_bt_WrapperAI_CrystalBehavior_node = new DecoratorLoop_bt_WrapperAI_CrystalBehavior_node14();

            decoratorLoop_bt_WrapperAI_CrystalBehavior_node.SetClassNameString("DecoratorLoop");
            decoratorLoop_bt_WrapperAI_CrystalBehavior_node.SetId(14);
            bt.AddChild(decoratorLoop_bt_WrapperAI_CrystalBehavior_node);
            Sequence sequence = new Sequence();

            sequence.SetClassNameString("Sequence");
            sequence.SetId(0);
            decoratorLoop_bt_WrapperAI_CrystalBehavior_node.AddChild(sequence);
            Condition_bt_WrapperAI_CrystalBehavior_node3 condition_bt_WrapperAI_CrystalBehavior_node = new Condition_bt_WrapperAI_CrystalBehavior_node3();

            condition_bt_WrapperAI_CrystalBehavior_node.SetClassNameString("Condition");
            condition_bt_WrapperAI_CrystalBehavior_node.SetId(3);
            sequence.AddChild(condition_bt_WrapperAI_CrystalBehavior_node);
            sequence.SetHasEvents(sequence.HasEvents() | condition_bt_WrapperAI_CrystalBehavior_node.HasEvents());
            Sequence sequence2 = new Sequence();

            sequence2.SetClassNameString("Sequence");
            sequence2.SetId(59);
            sequence.AddChild(sequence2);
            Action_bt_WrapperAI_CrystalBehavior_node4 action_bt_WrapperAI_CrystalBehavior_node = new Action_bt_WrapperAI_CrystalBehavior_node4();

            action_bt_WrapperAI_CrystalBehavior_node.SetClassNameString("Action");
            action_bt_WrapperAI_CrystalBehavior_node.SetId(4);
            sequence2.AddChild(action_bt_WrapperAI_CrystalBehavior_node);
            sequence2.SetHasEvents(sequence2.HasEvents() | action_bt_WrapperAI_CrystalBehavior_node.HasEvents());
            Action_bt_WrapperAI_CrystalBehavior_node5 action_bt_WrapperAI_CrystalBehavior_node2 = new Action_bt_WrapperAI_CrystalBehavior_node5();

            action_bt_WrapperAI_CrystalBehavior_node2.SetClassNameString("Action");
            action_bt_WrapperAI_CrystalBehavior_node2.SetId(5);
            sequence2.AddChild(action_bt_WrapperAI_CrystalBehavior_node2);
            sequence2.SetHasEvents(sequence2.HasEvents() | action_bt_WrapperAI_CrystalBehavior_node2.HasEvents());
            DecoratorLoop_bt_WrapperAI_CrystalBehavior_node65 decoratorLoop_bt_WrapperAI_CrystalBehavior_node2 = new DecoratorLoop_bt_WrapperAI_CrystalBehavior_node65();

            decoratorLoop_bt_WrapperAI_CrystalBehavior_node2.SetClassNameString("DecoratorLoop");
            decoratorLoop_bt_WrapperAI_CrystalBehavior_node2.SetId(65);
            sequence2.AddChild(decoratorLoop_bt_WrapperAI_CrystalBehavior_node2);
            Noop noop = new Noop();

            noop.SetClassNameString("Noop");
            noop.SetId(66);
            decoratorLoop_bt_WrapperAI_CrystalBehavior_node2.AddChild(noop);
            decoratorLoop_bt_WrapperAI_CrystalBehavior_node2.SetHasEvents(decoratorLoop_bt_WrapperAI_CrystalBehavior_node2.HasEvents() | noop.HasEvents());
            sequence2.SetHasEvents(sequence2.HasEvents() | decoratorLoop_bt_WrapperAI_CrystalBehavior_node2.HasEvents());
            sequence.SetHasEvents(sequence.HasEvents() | sequence2.HasEvents());
            decoratorLoop_bt_WrapperAI_CrystalBehavior_node.SetHasEvents(decoratorLoop_bt_WrapperAI_CrystalBehavior_node.HasEvents() | sequence.HasEvents());
            bt.SetHasEvents(bt.HasEvents() | decoratorLoop_bt_WrapperAI_CrystalBehavior_node.HasEvents());
            return(true);
        }
Example #2
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 node3 = new Sequence();
                node3.SetClassNameString("Sequence");
                node3.SetId(3);
#if !BEHAVIAC_RELEASE
                node3.SetAgentType("FirstAgent");
#endif
                bt.AddChild(node3);
                {
                    Assignment_bt_SelectBT_node4 node4 = new Assignment_bt_SelectBT_node4();
                    node4.SetClassNameString("Assignment");
                    node4.SetId(4);
#if !BEHAVIAC_RELEASE
                    node4.SetAgentType("FirstAgent");
#endif
                    node3.AddChild(node4);
                    node3.SetHasEvents(node3.HasEvents() | node4.HasEvents());
                }
                {
                    Selector node1 = new Selector();
                    node1.SetClassNameString("Selector");
                    node1.SetId(1);
#if !BEHAVIAC_RELEASE
                    node1.SetAgentType("FirstAgent");
#endif
                    node3.AddChild(node1);
                    {
                        Condition_bt_SelectBT_node2 node2 = new Condition_bt_SelectBT_node2();
                        node2.SetClassNameString("Condition");
                        node2.SetId(2);
#if !BEHAVIAC_RELEASE
                        node2.SetAgentType("FirstAgent");
#endif
                        node1.AddChild(node2);
                        node1.SetHasEvents(node1.HasEvents() | node2.HasEvents());
                    }
                    {
                        Action_bt_SelectBT_node0 node0 = new Action_bt_SelectBT_node0();
                        node0.SetClassNameString("Action");
                        node0.SetId(0);
#if !BEHAVIAC_RELEASE
                        node0.SetAgentType("FirstAgent");
#endif
                        node1.AddChild(node0);
                        node1.SetHasEvents(node1.HasEvents() | node0.HasEvents());
                    }
                    node3.SetHasEvents(node3.HasEvents() | node1.HasEvents());
                }
                bt.SetHasEvents(bt.HasEvents() | node3.HasEvents());
            }
            return(true);
        }
Example #3
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;
		}
Example #4
0
        /**
        relativePath is relateve to the workspace path. relativePath should not include extension.
        the file format(xml/bson) is specified by SetWorkspaceSettings.

        @param bForce
        force to load, otherwise it just uses the one in the cache
        */
        public static bool Load(string relativePath, bool bForce)
        {
            Debug.Check(string.IsNullOrEmpty(StringUtils.FindExtension(relativePath)), "no extention to specify");
            Debug.Check(Workspace.IsValidPath(relativePath));

            BehaviorTree pBT = null;
            if (BehaviorTrees.ContainsKey(relativePath))
            {
                if (!bForce)
                {
                    return true;
                }

                pBT = BehaviorTrees[relativePath];
            }

            string fullPath = Workspace.WorkspaceExportPath;
            fullPath += relativePath;

            string ext = "";
            EFileFormat f = Workspace.FileFormat;
            switch (f)
            {
                case EFileFormat.EFF_default:
                    {
					    // try to load the behavior in xml
						ext = ".xml";
					    if (FileManager.Instance.FileExist(fullPath, ext))
					    {
						    f = EFileFormat.EFF_xml;
					    }
					    else
					    {
						    // try to load the behavior in bson
                            ext = ".bson";
                            if (FileManager.Instance.FileExist(fullPath, ext))
						    {
                                f = EFileFormat.EFF_bson;
						    }
						    else
						    {
                                // try to load the behavior in cs
                                f = EFileFormat.EFF_cs;
						    }
					    }
				    }
                    break;

                case EFileFormat.EFF_xml:
                    ext = ".xml";
                    break;

                case EFileFormat.EFF_bson:
                    ext = ".bson";
                    break;

                case EFileFormat.EFF_cs:
                    break;

                default:
                    Debug.Check(false);
                    break;
            }

            bool bLoadResult = false;

            bool bCleared = false;
            bool bNewly = false;
            if (pBT == null)
            {
                bNewly = true;
                pBT = new BehaviorTree();

                //in case of circular referencebehavior
                BehaviorTrees[relativePath] = pBT;
            }

            Debug.Check(pBT != null);

            if (f == EFileFormat.EFF_xml || f == EFileFormat.EFF_bson)
            {
                byte[] pBuffer = ReadFileToBuffer(fullPath, ext);
                if (pBuffer != null)
                {
                    //if forced to reload
                    if (!bNewly)
                    {
                        bCleared = true;
                        pBT.Clear();
                    }

                    if (f == EFileFormat.EFF_xml)
                    {
                        bLoadResult = pBT.load_xml(pBuffer);
                    }
                    else
                    {
                        bLoadResult = pBT.load_bson(pBuffer);
                    }

                    PopFileFromBuffer(fullPath, ext, pBuffer);
                }
            }
            else if (f == EFileFormat.EFF_cs)
            {
                if (!bNewly)
                {
                    bCleared = true;
                    pBT.Clear();
                }

				try
				{
	                MethodInfo m = null;

	                if (BTCreators.ContainsKey(relativePath))
	                {
	                    m = BTCreators[relativePath];
	                }
	                else
	                {
						string clsName = "behaviac.bt_" + getValidFilename(relativePath);
	                    Type type = Utils.GetType(clsName);
	                    if (type != null)
	                    {
	                        m = type.GetMethod("build_behavior_tree", BindingFlags.Public | BindingFlags.Static);
	                        Debug.Check(m != null);
	                        if (m != null)
	                        {
	                            BTCreators[relativePath] = m;
	                        }
	                    }
	                }

	                if (m != null)
	                {
	                    object[] args = { pBT };
	                    bLoadResult = (bool)m.Invoke(null, args);
	                }
					else
					{
						Debug.Check(false);
						Debug.LogWarning("The generated_behaviors.cs file should be added into the app.");
					}
				}
				catch (Exception e)
				{
					string errorInfo = string.Format("The behavior {0} failed to be loaded : {1}", relativePath, e.Message);
					Debug.LogError(errorInfo);
				}
            }
            else
            {
                Debug.Check(false);
            }

            if (bLoadResult)
            {
                Debug.Check(pBT.GetName() == relativePath);
                if (!bNewly)
                {
                    Debug.Check(BehaviorTrees[pBT.GetName()] == pBT);
                }
            }
            else
            {
                if (bNewly)
                {
                    bool removed = BehaviorTrees.Remove(relativePath);
                    Debug.Check(removed);
                }
                else if (bCleared)
                {
                    //it has been cleared but failed to load, to remove it
                    BehaviorTrees.Remove(relativePath);
                }

                behaviac.Debug.LogWarning(string.Format("BehaviorTree {0} not loaded!", fullPath));
            }

            return bLoadResult;
        }
Example #5
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("par_test/property_as_left_value_and_param");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("EmployeeParTestAgent");
#endif
			// children
			{
				Sequence node13 = new Sequence();
				node13.SetClassNameString("Sequence");
				node13.SetId(13);
#if !BEHAVIAC_RELEASE
				node13.SetAgentType("EmployeeParTestAgent");
#endif
				bt.AddChild(node13);
				{
					Sequence node1 = new Sequence();
					node1.SetClassNameString("Sequence");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("EmployeeParTestAgent");
#endif
					node13.AddChild(node1);
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node0 node0 = new Assignment_bt_par_test_property_as_left_value_and_param_node0();
						node0.SetClassNameString("Assignment");
						node0.SetId(0);
#if !BEHAVIAC_RELEASE
						node0.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node0);
						node1.SetHasEvents(node1.HasEvents() | node0.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node15 node15 = new Assignment_bt_par_test_property_as_left_value_and_param_node15();
						node15.SetClassNameString("Assignment");
						node15.SetId(15);
#if !BEHAVIAC_RELEASE
						node15.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node15);
						node1.SetHasEvents(node1.HasEvents() | node15.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node2 node2 = new Assignment_bt_par_test_property_as_left_value_and_param_node2();
						node2.SetClassNameString("Assignment");
						node2.SetId(2);
#if !BEHAVIAC_RELEASE
						node2.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node2);
						node1.SetHasEvents(node1.HasEvents() | node2.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node3 node3 = new Assignment_bt_par_test_property_as_left_value_and_param_node3();
						node3.SetClassNameString("Assignment");
						node3.SetId(3);
#if !BEHAVIAC_RELEASE
						node3.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node3);
						node1.SetHasEvents(node1.HasEvents() | node3.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node4 node4 = new Assignment_bt_par_test_property_as_left_value_and_param_node4();
						node4.SetClassNameString("Assignment");
						node4.SetId(4);
#if !BEHAVIAC_RELEASE
						node4.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node4);
						node1.SetHasEvents(node1.HasEvents() | node4.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node5 node5 = new Assignment_bt_par_test_property_as_left_value_and_param_node5();
						node5.SetClassNameString("Assignment");
						node5.SetId(5);
#if !BEHAVIAC_RELEASE
						node5.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node5);
						node1.SetHasEvents(node1.HasEvents() | node5.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node6 node6 = new Assignment_bt_par_test_property_as_left_value_and_param_node6();
						node6.SetClassNameString("Assignment");
						node6.SetId(6);
#if !BEHAVIAC_RELEASE
						node6.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node6);
						node1.SetHasEvents(node1.HasEvents() | node6.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node7 node7 = new Assignment_bt_par_test_property_as_left_value_and_param_node7();
						node7.SetClassNameString("Assignment");
						node7.SetId(7);
#if !BEHAVIAC_RELEASE
						node7.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node7);
						node1.SetHasEvents(node1.HasEvents() | node7.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node8 node8 = new Assignment_bt_par_test_property_as_left_value_and_param_node8();
						node8.SetClassNameString("Assignment");
						node8.SetId(8);
#if !BEHAVIAC_RELEASE
						node8.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node8);
						node1.SetHasEvents(node1.HasEvents() | node8.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node30 node30 = new Assignment_bt_par_test_property_as_left_value_and_param_node30();
						node30.SetClassNameString("Assignment");
						node30.SetId(30);
#if !BEHAVIAC_RELEASE
						node30.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node30);
						node1.SetHasEvents(node1.HasEvents() | node30.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node31 node31 = new Assignment_bt_par_test_property_as_left_value_and_param_node31();
						node31.SetClassNameString("Assignment");
						node31.SetId(31);
#if !BEHAVIAC_RELEASE
						node31.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node31);
						node1.SetHasEvents(node1.HasEvents() | node31.HasEvents());
					}
					node13.SetHasEvents(node13.HasEvents() | node1.HasEvents());
				}
				{
					Sequence node14 = new Sequence();
					node14.SetClassNameString("Sequence");
					node14.SetId(14);
#if !BEHAVIAC_RELEASE
					node14.SetAgentType("EmployeeParTestAgent");
#endif
					node13.AddChild(node14);
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node9 node9 = new Assignment_bt_par_test_property_as_left_value_and_param_node9();
						node9.SetClassNameString("Assignment");
						node9.SetId(9);
#if !BEHAVIAC_RELEASE
						node9.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node9);
						node14.SetHasEvents(node14.HasEvents() | node9.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node10 node10 = new Assignment_bt_par_test_property_as_left_value_and_param_node10();
						node10.SetClassNameString("Assignment");
						node10.SetId(10);
#if !BEHAVIAC_RELEASE
						node10.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node10);
						node14.SetHasEvents(node14.HasEvents() | node10.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node11 node11 = new Assignment_bt_par_test_property_as_left_value_and_param_node11();
						node11.SetClassNameString("Assignment");
						node11.SetId(11);
#if !BEHAVIAC_RELEASE
						node11.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node11);
						node14.SetHasEvents(node14.HasEvents() | node11.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node12 node12 = new Assignment_bt_par_test_property_as_left_value_and_param_node12();
						node12.SetClassNameString("Assignment");
						node12.SetId(12);
#if !BEHAVIAC_RELEASE
						node12.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node12);
						node14.SetHasEvents(node14.HasEvents() | node12.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node17 node17 = new Assignment_bt_par_test_property_as_left_value_and_param_node17();
						node17.SetClassNameString("Assignment");
						node17.SetId(17);
#if !BEHAVIAC_RELEASE
						node17.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node17);
						node14.SetHasEvents(node14.HasEvents() | node17.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node19 node19 = new Assignment_bt_par_test_property_as_left_value_and_param_node19();
						node19.SetClassNameString("Assignment");
						node19.SetId(19);
#if !BEHAVIAC_RELEASE
						node19.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node19);
						node14.SetHasEvents(node14.HasEvents() | node19.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node18 node18 = new Assignment_bt_par_test_property_as_left_value_and_param_node18();
						node18.SetClassNameString("Assignment");
						node18.SetId(18);
#if !BEHAVIAC_RELEASE
						node18.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node18);
						node14.SetHasEvents(node14.HasEvents() | node18.HasEvents());
					}
					node13.SetHasEvents(node13.HasEvents() | node14.HasEvents());
				}
				{
					Sequence node22 = new Sequence();
					node22.SetClassNameString("Sequence");
					node22.SetId(22);
#if !BEHAVIAC_RELEASE
					node22.SetAgentType("EmployeeParTestAgent");
#endif
					node13.AddChild(node22);
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node16 node16 = new Assignment_bt_par_test_property_as_left_value_and_param_node16();
						node16.SetClassNameString("Assignment");
						node16.SetId(16);
#if !BEHAVIAC_RELEASE
						node16.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node16);
						node22.SetHasEvents(node22.HasEvents() | node16.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node20 node20 = new Assignment_bt_par_test_property_as_left_value_and_param_node20();
						node20.SetClassNameString("Assignment");
						node20.SetId(20);
#if !BEHAVIAC_RELEASE
						node20.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node20);
						node22.SetHasEvents(node22.HasEvents() | node20.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node24 node24 = new Assignment_bt_par_test_property_as_left_value_and_param_node24();
						node24.SetClassNameString("Assignment");
						node24.SetId(24);
#if !BEHAVIAC_RELEASE
						node24.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node24);
						node22.SetHasEvents(node22.HasEvents() | node24.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node25 node25 = new Assignment_bt_par_test_property_as_left_value_and_param_node25();
						node25.SetClassNameString("Assignment");
						node25.SetId(25);
#if !BEHAVIAC_RELEASE
						node25.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node25);
						node22.SetHasEvents(node22.HasEvents() | node25.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node26 node26 = new Assignment_bt_par_test_property_as_left_value_and_param_node26();
						node26.SetClassNameString("Assignment");
						node26.SetId(26);
#if !BEHAVIAC_RELEASE
						node26.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node26);
						node22.SetHasEvents(node22.HasEvents() | node26.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node27 node27 = new Assignment_bt_par_test_property_as_left_value_and_param_node27();
						node27.SetClassNameString("Assignment");
						node27.SetId(27);
#if !BEHAVIAC_RELEASE
						node27.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node27);
						node22.SetHasEvents(node22.HasEvents() | node27.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node21 node21 = new Assignment_bt_par_test_property_as_left_value_and_param_node21();
						node21.SetClassNameString("Assignment");
						node21.SetId(21);
#if !BEHAVIAC_RELEASE
						node21.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node21);
						node22.SetHasEvents(node22.HasEvents() | node21.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node23 node23 = new Assignment_bt_par_test_property_as_left_value_and_param_node23();
						node23.SetClassNameString("Assignment");
						node23.SetId(23);
#if !BEHAVIAC_RELEASE
						node23.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node23);
						node22.SetHasEvents(node22.HasEvents() | node23.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node28 node28 = new Assignment_bt_par_test_property_as_left_value_and_param_node28();
						node28.SetClassNameString("Assignment");
						node28.SetId(28);
#if !BEHAVIAC_RELEASE
						node28.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node28);
						node22.SetHasEvents(node22.HasEvents() | node28.HasEvents());
					}
					{
						Assignment_bt_par_test_property_as_left_value_and_param_node29 node29 = new Assignment_bt_par_test_property_as_left_value_and_param_node29();
						node29.SetClassNameString("Assignment");
						node29.SetId(29);
#if !BEHAVIAC_RELEASE
						node29.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node29);
						node22.SetHasEvents(node22.HasEvents() | node29.HasEvents());
					}
					node13.SetHasEvents(node13.HasEvents() | node22.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node13.HasEvents());
			}
			return true;
		}
Example #6
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/fsm/fsm_ref_fsm_ut");
			bt.IsFSM = true;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("FSMAgentTest");
#endif
			// attachments
			// children
			{
				FSM fsm = new FSM();
				fsm.SetClassNameString("FSM");
				fsm.SetId(-1);
				fsm.InitialId = 3;
#if !BEHAVIAC_RELEASE
				fsm.SetAgentType("FSMAgentTest");
#endif
				{
					State_bt_node_test_fsm_fsm_ref_fsm_ut_node3 node3 = new State_bt_node_test_fsm_fsm_ref_fsm_ut_node3();
					node3.SetClassNameString("State");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("FSMAgentTest");
#endif
					// attachments
					{
						Precondition_bt_node_test_fsm_fsm_ref_fsm_ut_attach10 attach10 = new Precondition_bt_node_test_fsm_fsm_ref_fsm_ut_attach10();
						attach10.SetClassNameString("Precondition");
						attach10.SetId(10);
#if !BEHAVIAC_RELEASE
						attach10.SetAgentType("FSMAgentTest");
#endif
						node3.Attach(attach10, true, false, false);
					}
					{
						Transition_bt_node_test_fsm_fsm_ref_fsm_ut_attach5 attach5 = new Transition_bt_node_test_fsm_fsm_ref_fsm_ut_attach5();
						attach5.SetClassNameString("Transition");
						attach5.SetId(5);
#if !BEHAVIAC_RELEASE
						attach5.SetAgentType("FSMAgentTest");
#endif
						node3.Attach(attach5, false, false, true);
					}
					{
						Effector_bt_node_test_fsm_fsm_ref_fsm_ut_attach14 attach14 = new Effector_bt_node_test_fsm_fsm_ref_fsm_ut_attach14();
						attach14.SetClassNameString("Effector");
						attach14.SetId(14);
#if !BEHAVIAC_RELEASE
						attach14.SetAgentType("FSMAgentTest");
#endif
						node3.Attach(attach14, false, true, false);
					}
					{
						Transition_bt_node_test_fsm_fsm_ref_fsm_ut_attach6 attach6 = new Transition_bt_node_test_fsm_fsm_ref_fsm_ut_attach6();
						attach6.SetClassNameString("Transition");
						attach6.SetId(6);
#if !BEHAVIAC_RELEASE
						attach6.SetAgentType("FSMAgentTest");
#endif
						node3.Attach(attach6, false, false, true);
					}
					fsm.AddChild(node3);
					fsm.SetHasEvents(fsm.HasEvents() | node3.HasEvents());
				}
				{
					State_bt_node_test_fsm_fsm_ref_fsm_ut_node2 node2 = new State_bt_node_test_fsm_fsm_ref_fsm_ut_node2();
					node2.SetClassNameString("State");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("FSMAgentTest");
#endif
					// attachments
					{
						Precondition_bt_node_test_fsm_fsm_ref_fsm_ut_attach12 attach12 = new Precondition_bt_node_test_fsm_fsm_ref_fsm_ut_attach12();
						attach12.SetClassNameString("Precondition");
						attach12.SetId(12);
#if !BEHAVIAC_RELEASE
						attach12.SetAgentType("FSMAgentTest");
#endif
						node2.Attach(attach12, true, false, false);
					}
					{
						Effector_bt_node_test_fsm_fsm_ref_fsm_ut_attach15 attach15 = new Effector_bt_node_test_fsm_fsm_ref_fsm_ut_attach15();
						attach15.SetClassNameString("Effector");
						attach15.SetId(15);
#if !BEHAVIAC_RELEASE
						attach15.SetAgentType("FSMAgentTest");
#endif
						node2.Attach(attach15, false, true, false);
					}
					fsm.AddChild(node2);
					fsm.SetHasEvents(fsm.HasEvents() | node2.HasEvents());
				}
				{
					State_bt_node_test_fsm_fsm_ref_fsm_ut_node4 node4 = new State_bt_node_test_fsm_fsm_ref_fsm_ut_node4();
					node4.SetClassNameString("State");
					node4.SetId(4);
#if !BEHAVIAC_RELEASE
					node4.SetAgentType("FSMAgentTest");
#endif
					// attachments
					{
						Precondition_bt_node_test_fsm_fsm_ref_fsm_ut_attach13 attach13 = new Precondition_bt_node_test_fsm_fsm_ref_fsm_ut_attach13();
						attach13.SetClassNameString("Precondition");
						attach13.SetId(13);
#if !BEHAVIAC_RELEASE
						attach13.SetAgentType("FSMAgentTest");
#endif
						node4.Attach(attach13, true, false, false);
					}
					{
						Transition_bt_node_test_fsm_fsm_ref_fsm_ut_attach8 attach8 = new Transition_bt_node_test_fsm_fsm_ref_fsm_ut_attach8();
						attach8.SetClassNameString("Transition");
						attach8.SetId(8);
#if !BEHAVIAC_RELEASE
						attach8.SetAgentType("FSMAgentTest");
#endif
						node4.Attach(attach8, false, false, true);
					}
					{
						Transition_bt_node_test_fsm_fsm_ref_fsm_ut_attach9 attach9 = new Transition_bt_node_test_fsm_fsm_ref_fsm_ut_attach9();
						attach9.SetClassNameString("Transition");
						attach9.SetId(9);
#if !BEHAVIAC_RELEASE
						attach9.SetAgentType("FSMAgentTest");
#endif
						node4.Attach(attach9, false, false, true);
					}
					{
						Effector_bt_node_test_fsm_fsm_ref_fsm_ut_attach16 attach16 = new Effector_bt_node_test_fsm_fsm_ref_fsm_ut_attach16();
						attach16.SetClassNameString("Effector");
						attach16.SetId(16);
#if !BEHAVIAC_RELEASE
						attach16.SetAgentType("FSMAgentTest");
#endif
						node4.Attach(attach16, false, true, false);
					}
					fsm.AddChild(node4);
					fsm.SetHasEvents(fsm.HasEvents() | node4.HasEvents());
				}
				{
					ReferencedBehavior_bt_node_test_fsm_fsm_ref_fsm_ut_node18 node18 = new ReferencedBehavior_bt_node_test_fsm_fsm_ref_fsm_ut_node18();
					node18.SetClassNameString("ReferencedBehavior");
					node18.SetId(18);
#if !BEHAVIAC_RELEASE
					node18.SetAgentType("FSMAgentTest");
#endif
					// attachments
					{
						Precondition_bt_node_test_fsm_fsm_ref_fsm_ut_attach11 attach11 = new Precondition_bt_node_test_fsm_fsm_ref_fsm_ut_attach11();
						attach11.SetClassNameString("Precondition");
						attach11.SetId(11);
#if !BEHAVIAC_RELEASE
						attach11.SetAgentType("FSMAgentTest");
#endif
						node18.Attach(attach11, true, false, false);
					}
					{
						Transition_bt_node_test_fsm_fsm_ref_fsm_ut_attach7 attach7 = new Transition_bt_node_test_fsm_fsm_ref_fsm_ut_attach7();
						attach7.SetClassNameString("Transition");
						attach7.SetId(7);
#if !BEHAVIAC_RELEASE
						attach7.SetAgentType("FSMAgentTest");
#endif
						node18.Attach(attach7, false, false, true);
					}
					{
						Effector_bt_node_test_fsm_fsm_ref_fsm_ut_attach17 attach17 = new Effector_bt_node_test_fsm_fsm_ref_fsm_ut_attach17();
						attach17.SetClassNameString("Effector");
						attach17.SetId(17);
#if !BEHAVIAC_RELEASE
						attach17.SetAgentType("FSMAgentTest");
#endif
						node18.Attach(attach17, false, true, false);
					}
					fsm.AddChild(node18);
					fsm.SetHasEvents(fsm.HasEvents() | node18.HasEvents());
				}
				bt.AddChild(fsm);
			}
			return true;
		}
Example #7
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;
		}
Example #8
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;
		}
Example #9
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/condition_ut_1");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// pars
			bt.AddPar("AgentNodeTest", "ParTestAgent", "par_agent", "null");
			// children
			{
				Sequence node0 = new Sequence();
				node0.SetClassNameString("Sequence");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("AgentNodeTest");
#endif
				bt.AddChild(node0);
				{
					Or node9 = new Or();
					node9.SetClassNameString("Or");
					node9.SetId(9);
#if !BEHAVIAC_RELEASE
					node9.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node9);
					{
						Condition_bt_node_test_condition_ut_1_node10 node10 = new Condition_bt_node_test_condition_ut_1_node10();
						node10.SetClassNameString("Condition");
						node10.SetId(10);
#if !BEHAVIAC_RELEASE
						node10.SetAgentType("AgentNodeTest");
#endif
						node9.AddChild(node10);
						node9.SetHasEvents(node9.HasEvents() | node10.HasEvents());
					}
					{
						True node11 = new True();
						node11.SetClassNameString("True");
						node11.SetId(11);
#if !BEHAVIAC_RELEASE
						node11.SetAgentType("AgentNodeTest");
#endif
						node9.AddChild(node11);
						node9.SetHasEvents(node9.HasEvents() | node11.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node9.HasEvents());
				}
				{
					Or node1 = new Or();
					node1.SetClassNameString("Or");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node1);
					{
						True node3 = new True();
						node3.SetClassNameString("True");
						node3.SetId(3);
#if !BEHAVIAC_RELEASE
						node3.SetAgentType("AgentNodeTest");
#endif
						node1.AddChild(node3);
						node1.SetHasEvents(node1.HasEvents() | node3.HasEvents());
					}
					{
						False node5 = new False();
						node5.SetClassNameString("False");
						node5.SetId(5);
#if !BEHAVIAC_RELEASE
						node5.SetAgentType("AgentNodeTest");
#endif
						node1.AddChild(node5);
						node1.SetHasEvents(node1.HasEvents() | node5.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Action_bt_node_test_condition_ut_1_node2 node2 = new Action_bt_node_test_condition_ut_1_node2();
					node2.SetClassNameString("Action");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node2);
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Or node4 = new Or();
					node4.SetClassNameString("Or");
					node4.SetId(4);
#if !BEHAVIAC_RELEASE
					node4.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node4);
					{
						False node6 = new False();
						node6.SetClassNameString("False");
						node6.SetId(6);
#if !BEHAVIAC_RELEASE
						node6.SetAgentType("AgentNodeTest");
#endif
						node4.AddChild(node6);
						node4.SetHasEvents(node4.HasEvents() | node6.HasEvents());
					}
					{
						False node7 = new False();
						node7.SetClassNameString("False");
						node7.SetId(7);
#if !BEHAVIAC_RELEASE
						node7.SetAgentType("AgentNodeTest");
#endif
						node4.AddChild(node7);
						node4.SetHasEvents(node4.HasEvents() | node7.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
				}
				{
					Action_bt_node_test_condition_ut_1_node8 node8 = new Action_bt_node_test_condition_ut_1_node8();
					node8.SetClassNameString("Action");
					node8.SetId(8);
#if !BEHAVIAC_RELEASE
					node8.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node8);
					node0.SetHasEvents(node0.HasEvents() | node8.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
Example #10
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/action_ut_0");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// pars
			bt.AddPar("AgentNodeTest", "int", "par_int_type_0", "0");
			bt.AddPar("AgentNodeTest", "int", "par_int_type_1", "0");
			bt.AddPar("AgentNodeTest", "int", "par_int_type_2", "300");
			bt.AddPar("AgentNodeTest", "UnityEngine.GameObject", "par_go", "null");
			bt.AddPar("AgentNodeTest", "ChildNodeTest", "par_child", "null");
			// children
			{
				Sequence node0 = new Sequence();
				node0.SetClassNameString("Sequence");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("AgentNodeTest");
#endif
				// attachments
				{
					Precondition_bt_node_test_action_ut_0_attach15 attach15 = new Precondition_bt_node_test_action_ut_0_attach15();
					attach15.SetClassNameString("Precondition");
					attach15.SetId(15);
#if !BEHAVIAC_RELEASE
					attach15.SetAgentType("AgentNodeTest");
#endif
					node0.Attach(attach15, true, false, false);
				}
				bt.AddChild(node0);
				{
					Action_bt_node_test_action_ut_0_node14 node14 = new Action_bt_node_test_action_ut_0_node14();
					node14.SetClassNameString("Action");
					node14.SetId(14);
#if !BEHAVIAC_RELEASE
					node14.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node14);
					node0.SetHasEvents(node0.HasEvents() | node14.HasEvents());
				}
				{
					Assignment_bt_node_test_action_ut_0_node12 node12 = new Assignment_bt_node_test_action_ut_0_node12();
					node12.SetClassNameString("Assignment");
					node12.SetId(12);
#if !BEHAVIAC_RELEASE
					node12.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node12);
					node0.SetHasEvents(node0.HasEvents() | node12.HasEvents());
				}
				{
					Condition_bt_node_test_action_ut_0_node13 node13 = new Condition_bt_node_test_action_ut_0_node13();
					node13.SetClassNameString("Condition");
					node13.SetId(13);
#if !BEHAVIAC_RELEASE
					node13.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node13);
					node0.SetHasEvents(node0.HasEvents() | node13.HasEvents());
				}
				{
					Assignment_bt_node_test_action_ut_0_node10 node10 = new Assignment_bt_node_test_action_ut_0_node10();
					node10.SetClassNameString("Assignment");
					node10.SetId(10);
#if !BEHAVIAC_RELEASE
					node10.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node10);
					node0.SetHasEvents(node0.HasEvents() | node10.HasEvents());
				}
				{
					Condition_bt_node_test_action_ut_0_node11 node11 = new Condition_bt_node_test_action_ut_0_node11();
					node11.SetClassNameString("Condition");
					node11.SetId(11);
#if !BEHAVIAC_RELEASE
					node11.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node11);
					node0.SetHasEvents(node0.HasEvents() | node11.HasEvents());
				}
				{
					Condition_bt_node_test_action_ut_0_node8 node8 = new Condition_bt_node_test_action_ut_0_node8();
					node8.SetClassNameString("Condition");
					node8.SetId(8);
#if !BEHAVIAC_RELEASE
					node8.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node8);
					node0.SetHasEvents(node0.HasEvents() | node8.HasEvents());
				}
				{
					Action_bt_node_test_action_ut_0_node9 node9 = new Action_bt_node_test_action_ut_0_node9();
					node9.SetClassNameString("Action");
					node9.SetId(9);
#if !BEHAVIAC_RELEASE
					node9.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node9);
					node0.SetHasEvents(node0.HasEvents() | node9.HasEvents());
				}
				{
					Compute_bt_node_test_action_ut_0_node1 node1 = new Compute_bt_node_test_action_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());
				}
				{
					Action_bt_node_test_action_ut_0_node2 node2 = new Action_bt_node_test_action_ut_0_node2();
					node2.SetClassNameString("Action");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node2);
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Assignment_bt_node_test_action_ut_0_node3 node3 = new Assignment_bt_node_test_action_ut_0_node3();
					node3.SetClassNameString("Assignment");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node3);
					node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
				}
				{
					Compute_bt_node_test_action_ut_0_node4 node4 = new Compute_bt_node_test_action_ut_0_node4();
					node4.SetClassNameString("Compute");
					node4.SetId(4);
#if !BEHAVIAC_RELEASE
					node4.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node4);
					node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
				}
				{
					Action_bt_node_test_action_ut_0_node5 node5 = new Action_bt_node_test_action_ut_0_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_action_ut_0_node7 node7 = new Action_bt_node_test_action_ut_0_node7();
					node7.SetClassNameString("Action");
					node7.SetId(7);
#if !BEHAVIAC_RELEASE
					node7.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node7);
					node0.SetHasEvents(node0.HasEvents() | node7.HasEvents());
				}
				{
					Action_bt_node_test_action_ut_0_node6 node6 = new Action_bt_node_test_action_ut_0_node6();
					node6.SetClassNameString("Action");
					node6.SetId(6);
#if !BEHAVIAC_RELEASE
					node6.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node6);
					node0.SetHasEvents(node0.HasEvents() | node6.HasEvents());
				}
				{
					Action_bt_node_test_action_ut_0_node16 node16 = new Action_bt_node_test_action_ut_0_node16();
					node16.SetClassNameString("Action");
					node16.SetId(16);
#if !BEHAVIAC_RELEASE
					node16.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node16);
					node0.SetHasEvents(node0.HasEvents() | node16.HasEvents());
				}
				{
					Action_bt_node_test_action_ut_0_node17 node17 = new Action_bt_node_test_action_ut_0_node17();
					node17.SetClassNameString("Action");
					node17.SetId(17);
#if !BEHAVIAC_RELEASE
					node17.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node17);
					node0.SetHasEvents(node0.HasEvents() | node17.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
Example #11
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;
		}
Example #12
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("par_test/static_property_as_ref_param");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("EmployeeParTestAgent");
#endif
			// children
			{
				Sequence node0 = new Sequence();
				node0.SetClassNameString("Sequence");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("EmployeeParTestAgent");
#endif
				bt.AddChild(node0);
				{
					Sequence node1 = new Sequence();
					node1.SetClassNameString("Sequence");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node1);
					{
						Action_bt_par_test_static_property_as_ref_param_node4 node4 = new Action_bt_par_test_static_property_as_ref_param_node4();
						node4.SetClassNameString("Action");
						node4.SetId(4);
#if !BEHAVIAC_RELEASE
						node4.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node4);
						node1.SetHasEvents(node1.HasEvents() | node4.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node5 node5 = new Action_bt_par_test_static_property_as_ref_param_node5();
						node5.SetClassNameString("Action");
						node5.SetId(5);
#if !BEHAVIAC_RELEASE
						node5.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node5);
						node1.SetHasEvents(node1.HasEvents() | node5.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node6 node6 = new Action_bt_par_test_static_property_as_ref_param_node6();
						node6.SetClassNameString("Action");
						node6.SetId(6);
#if !BEHAVIAC_RELEASE
						node6.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node6);
						node1.SetHasEvents(node1.HasEvents() | node6.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node7 node7 = new Action_bt_par_test_static_property_as_ref_param_node7();
						node7.SetClassNameString("Action");
						node7.SetId(7);
#if !BEHAVIAC_RELEASE
						node7.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node7);
						node1.SetHasEvents(node1.HasEvents() | node7.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node8 node8 = new Action_bt_par_test_static_property_as_ref_param_node8();
						node8.SetClassNameString("Action");
						node8.SetId(8);
#if !BEHAVIAC_RELEASE
						node8.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node8);
						node1.SetHasEvents(node1.HasEvents() | node8.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node9 node9 = new Action_bt_par_test_static_property_as_ref_param_node9();
						node9.SetClassNameString("Action");
						node9.SetId(9);
#if !BEHAVIAC_RELEASE
						node9.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node9);
						node1.SetHasEvents(node1.HasEvents() | node9.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node10 node10 = new Action_bt_par_test_static_property_as_ref_param_node10();
						node10.SetClassNameString("Action");
						node10.SetId(10);
#if !BEHAVIAC_RELEASE
						node10.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node10);
						node1.SetHasEvents(node1.HasEvents() | node10.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Sequence node2 = new Sequence();
					node2.SetClassNameString("Sequence");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node2);
					{
						Action_bt_par_test_static_property_as_ref_param_node15 node15 = new Action_bt_par_test_static_property_as_ref_param_node15();
						node15.SetClassNameString("Action");
						node15.SetId(15);
#if !BEHAVIAC_RELEASE
						node15.SetAgentType("EmployeeParTestAgent");
#endif
						node2.AddChild(node15);
						node2.SetHasEvents(node2.HasEvents() | node15.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node12 node12 = new Action_bt_par_test_static_property_as_ref_param_node12();
						node12.SetClassNameString("Action");
						node12.SetId(12);
#if !BEHAVIAC_RELEASE
						node12.SetAgentType("EmployeeParTestAgent");
#endif
						node2.AddChild(node12);
						node2.SetHasEvents(node2.HasEvents() | node12.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node13 node13 = new Action_bt_par_test_static_property_as_ref_param_node13();
						node13.SetClassNameString("Action");
						node13.SetId(13);
#if !BEHAVIAC_RELEASE
						node13.SetAgentType("EmployeeParTestAgent");
#endif
						node2.AddChild(node13);
						node2.SetHasEvents(node2.HasEvents() | node13.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node11 node11 = new Action_bt_par_test_static_property_as_ref_param_node11();
						node11.SetClassNameString("Action");
						node11.SetId(11);
#if !BEHAVIAC_RELEASE
						node11.SetAgentType("EmployeeParTestAgent");
#endif
						node2.AddChild(node11);
						node2.SetHasEvents(node2.HasEvents() | node11.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Sequence node3 = new Sequence();
					node3.SetClassNameString("Sequence");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node3);
					{
						Action_bt_par_test_static_property_as_ref_param_node14 node14 = new Action_bt_par_test_static_property_as_ref_param_node14();
						node14.SetClassNameString("Action");
						node14.SetId(14);
#if !BEHAVIAC_RELEASE
						node14.SetAgentType("EmployeeParTestAgent");
#endif
						node3.AddChild(node14);
						node3.SetHasEvents(node3.HasEvents() | node14.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node16 node16 = new Action_bt_par_test_static_property_as_ref_param_node16();
						node16.SetClassNameString("Action");
						node16.SetId(16);
#if !BEHAVIAC_RELEASE
						node16.SetAgentType("EmployeeParTestAgent");
#endif
						node3.AddChild(node16);
						node3.SetHasEvents(node3.HasEvents() | node16.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node17 node17 = new Action_bt_par_test_static_property_as_ref_param_node17();
						node17.SetClassNameString("Action");
						node17.SetId(17);
#if !BEHAVIAC_RELEASE
						node17.SetAgentType("EmployeeParTestAgent");
#endif
						node3.AddChild(node17);
						node3.SetHasEvents(node3.HasEvents() | node17.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node18 node18 = new Action_bt_par_test_static_property_as_ref_param_node18();
						node18.SetClassNameString("Action");
						node18.SetId(18);
#if !BEHAVIAC_RELEASE
						node18.SetAgentType("EmployeeParTestAgent");
#endif
						node3.AddChild(node18);
						node3.SetHasEvents(node3.HasEvents() | node18.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node19 node19 = new Action_bt_par_test_static_property_as_ref_param_node19();
						node19.SetClassNameString("Action");
						node19.SetId(19);
#if !BEHAVIAC_RELEASE
						node19.SetAgentType("EmployeeParTestAgent");
#endif
						node3.AddChild(node19);
						node3.SetHasEvents(node3.HasEvents() | node19.HasEvents());
					}
					{
						Action_bt_par_test_static_property_as_ref_param_node20 node20 = new Action_bt_par_test_static_property_as_ref_param_node20();
						node20.SetClassNameString("Action");
						node20.SetId(20);
#if !BEHAVIAC_RELEASE
						node20.SetAgentType("EmployeeParTestAgent");
#endif
						node3.AddChild(node20);
						node3.SetHasEvents(node3.HasEvents() | node20.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
Example #13
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("par_test/vector_test");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
			// pars
			bt.AddPar("TestNS::AgentArrayAccessTest", "int", "l_index", "0");
			bt.AddPar("TestNS::AgentArrayAccessTest", "vector<int>", "l_ListInts", "5:100|200|300|400|500");
			bt.AddPar("TestNS::AgentArrayAccessTest", "int", "l_Int", "0");
			// children
			{
				Sequence node22 = new Sequence();
				node22.SetClassNameString("Sequence");
				node22.SetId(22);
#if !BEHAVIAC_RELEASE
				node22.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
				bt.AddChild(node22);
				{
					Assignment_bt_par_test_vector_test_node0 node0 = new Assignment_bt_par_test_vector_test_node0();
					node0.SetClassNameString("Assignment");
					node0.SetId(0);
#if !BEHAVIAC_RELEASE
					node0.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
					node22.AddChild(node0);
					node22.SetHasEvents(node22.HasEvents() | node0.HasEvents());
				}
				{
					Assignment_bt_par_test_vector_test_node1 node1 = new Assignment_bt_par_test_vector_test_node1();
					node1.SetClassNameString("Assignment");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
					node22.AddChild(node1);
					node22.SetHasEvents(node22.HasEvents() | node1.HasEvents());
				}
				{
					Assignment_bt_par_test_vector_test_node16 node16 = new Assignment_bt_par_test_vector_test_node16();
					node16.SetClassNameString("Assignment");
					node16.SetId(16);
#if !BEHAVIAC_RELEASE
					node16.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
					node22.AddChild(node16);
					node22.SetHasEvents(node22.HasEvents() | node16.HasEvents());
				}
				{
					Assignment_bt_par_test_vector_test_node2 node2 = new Assignment_bt_par_test_vector_test_node2();
					node2.SetClassNameString("Assignment");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
					node22.AddChild(node2);
					node22.SetHasEvents(node22.HasEvents() | node2.HasEvents());
				}
				{
					Assignment_bt_par_test_vector_test_node4 node4 = new Assignment_bt_par_test_vector_test_node4();
					node4.SetClassNameString("Assignment");
					node4.SetId(4);
#if !BEHAVIAC_RELEASE
					node4.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
					node22.AddChild(node4);
					node22.SetHasEvents(node22.HasEvents() | node4.HasEvents());
				}
				{
					Compute_bt_par_test_vector_test_node3 node3 = new Compute_bt_par_test_vector_test_node3();
					node3.SetClassNameString("Compute");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
					node22.AddChild(node3);
					node22.SetHasEvents(node22.HasEvents() | node3.HasEvents());
				}
				{
					Assignment_bt_par_test_vector_test_node5 node5 = new Assignment_bt_par_test_vector_test_node5();
					node5.SetClassNameString("Assignment");
					node5.SetId(5);
#if !BEHAVIAC_RELEASE
					node5.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
					node22.AddChild(node5);
					node22.SetHasEvents(node22.HasEvents() | node5.HasEvents());
				}
				{
					Action_bt_par_test_vector_test_node6 node6 = new Action_bt_par_test_vector_test_node6();
					node6.SetClassNameString("Action");
					node6.SetId(6);
#if !BEHAVIAC_RELEASE
					node6.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
					node22.AddChild(node6);
					node22.SetHasEvents(node22.HasEvents() | node6.HasEvents());
				}
				{
					Action_bt_par_test_vector_test_node7 node7 = new Action_bt_par_test_vector_test_node7();
					node7.SetClassNameString("Action");
					node7.SetId(7);
#if !BEHAVIAC_RELEASE
					node7.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
					node22.AddChild(node7);
					node22.SetHasEvents(node22.HasEvents() | node7.HasEvents());
				}
				{
					DecoratorLoop_bt_par_test_vector_test_node8 node8 = new DecoratorLoop_bt_par_test_vector_test_node8();
					node8.SetClassNameString("DecoratorLoop");
					node8.SetId(8);
#if !BEHAVIAC_RELEASE
					node8.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
					node22.AddChild(node8);
					{
						Sequence node12 = new Sequence();
						node12.SetClassNameString("Sequence");
						node12.SetId(12);
#if !BEHAVIAC_RELEASE
						node12.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
						node8.AddChild(node12);
						{
							Assignment_bt_par_test_vector_test_node14 node14 = new Assignment_bt_par_test_vector_test_node14();
							node14.SetClassNameString("Assignment");
							node14.SetId(14);
#if !BEHAVIAC_RELEASE
							node14.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
							node12.AddChild(node14);
							node12.SetHasEvents(node12.HasEvents() | node14.HasEvents());
						}
						{
							Action_bt_par_test_vector_test_node9 node9 = new Action_bt_par_test_vector_test_node9();
							node9.SetClassNameString("Action");
							node9.SetId(9);
#if !BEHAVIAC_RELEASE
							node9.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
							node12.AddChild(node9);
							node12.SetHasEvents(node12.HasEvents() | node9.HasEvents());
						}
						node8.SetHasEvents(node8.HasEvents() | node12.HasEvents());
					}
					node22.SetHasEvents(node22.HasEvents() | node8.HasEvents());
				}
				{
					DecoratorLoop_bt_par_test_vector_test_node10 node10 = new DecoratorLoop_bt_par_test_vector_test_node10();
					node10.SetClassNameString("DecoratorLoop");
					node10.SetId(10);
#if !BEHAVIAC_RELEASE
					node10.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
					node22.AddChild(node10);
					{
						Sequence node13 = new Sequence();
						node13.SetClassNameString("Sequence");
						node13.SetId(13);
#if !BEHAVIAC_RELEASE
						node13.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
						node10.AddChild(node13);
						{
							Assignment_bt_par_test_vector_test_node15 node15 = new Assignment_bt_par_test_vector_test_node15();
							node15.SetClassNameString("Assignment");
							node15.SetId(15);
#if !BEHAVIAC_RELEASE
							node15.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
							node13.AddChild(node15);
							node13.SetHasEvents(node13.HasEvents() | node15.HasEvents());
						}
						{
							Action_bt_par_test_vector_test_node11 node11 = new Action_bt_par_test_vector_test_node11();
							node11.SetClassNameString("Action");
							node11.SetId(11);
#if !BEHAVIAC_RELEASE
							node11.SetAgentType("TestNS.AgentArrayAccessTest");
#endif
							node13.AddChild(node11);
							node13.SetHasEvents(node13.HasEvents() | node11.HasEvents());
						}
						node10.SetHasEvents(node10.HasEvents() | node13.HasEvents());
					}
					node22.SetHasEvents(node22.HasEvents() | node10.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node22.HasEvents());
			}
			return true;
		}
Example #14
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("par_test/register_name_as_left_value_and_param");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("EmployeeParTestAgent");
#endif
			// children
			{
				Sequence node0 = new Sequence();
				node0.SetClassNameString("Sequence");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("EmployeeParTestAgent");
#endif
				bt.AddChild(node0);
				{
					Assignment_bt_par_test_register_name_as_left_value_and_param_node1 node1 = new Assignment_bt_par_test_register_name_as_left_value_and_param_node1();
					node1.SetClassNameString("Assignment");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node1);
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Assignment_bt_par_test_register_name_as_left_value_and_param_node4 node4 = new Assignment_bt_par_test_register_name_as_left_value_and_param_node4();
					node4.SetClassNameString("Assignment");
					node4.SetId(4);
#if !BEHAVIAC_RELEASE
					node4.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node4);
					node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
				}
				{
					Assignment_bt_par_test_register_name_as_left_value_and_param_node5 node5 = new Assignment_bt_par_test_register_name_as_left_value_and_param_node5();
					node5.SetClassNameString("Assignment");
					node5.SetId(5);
#if !BEHAVIAC_RELEASE
					node5.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node5);
					node0.SetHasEvents(node0.HasEvents() | node5.HasEvents());
				}
				{
					Assignment_bt_par_test_register_name_as_left_value_and_param_node6 node6 = new Assignment_bt_par_test_register_name_as_left_value_and_param_node6();
					node6.SetClassNameString("Assignment");
					node6.SetId(6);
#if !BEHAVIAC_RELEASE
					node6.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node6);
					node0.SetHasEvents(node0.HasEvents() | node6.HasEvents());
				}
				{
					Assignment_bt_par_test_register_name_as_left_value_and_param_node7 node7 = new Assignment_bt_par_test_register_name_as_left_value_and_param_node7();
					node7.SetClassNameString("Assignment");
					node7.SetId(7);
#if !BEHAVIAC_RELEASE
					node7.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node7);
					node0.SetHasEvents(node0.HasEvents() | node7.HasEvents());
				}
				{
					Assignment_bt_par_test_register_name_as_left_value_and_param_node8 node8 = new Assignment_bt_par_test_register_name_as_left_value_and_param_node8();
					node8.SetClassNameString("Assignment");
					node8.SetId(8);
#if !BEHAVIAC_RELEASE
					node8.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node8);
					node0.SetHasEvents(node0.HasEvents() | node8.HasEvents());
				}
				{
					Assignment_bt_par_test_register_name_as_left_value_and_param_node9 node9 = new Assignment_bt_par_test_register_name_as_left_value_and_param_node9();
					node9.SetClassNameString("Assignment");
					node9.SetId(9);
#if !BEHAVIAC_RELEASE
					node9.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node9);
					node0.SetHasEvents(node0.HasEvents() | node9.HasEvents());
				}
				{
					Assignment_bt_par_test_register_name_as_left_value_and_param_node10 node10 = new Assignment_bt_par_test_register_name_as_left_value_and_param_node10();
					node10.SetClassNameString("Assignment");
					node10.SetId(10);
#if !BEHAVIAC_RELEASE
					node10.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node10);
					node0.SetHasEvents(node0.HasEvents() | node10.HasEvents());
				}
				{
					Assignment_bt_par_test_register_name_as_left_value_and_param_node11 node11 = new Assignment_bt_par_test_register_name_as_left_value_and_param_node11();
					node11.SetClassNameString("Assignment");
					node11.SetId(11);
#if !BEHAVIAC_RELEASE
					node11.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node11);
					node0.SetHasEvents(node0.HasEvents() | node11.HasEvents());
				}
				{
					Assignment_bt_par_test_register_name_as_left_value_and_param_node12 node12 = new Assignment_bt_par_test_register_name_as_left_value_and_param_node12();
					node12.SetClassNameString("Assignment");
					node12.SetId(12);
#if !BEHAVIAC_RELEASE
					node12.SetAgentType("EmployeeParTestAgent");
#endif
					node0.AddChild(node12);
					node0.SetHasEvents(node0.HasEvents() | node12.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
Example #15
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/fsm/bt_ref_fsm");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("FSMAgentTest");
#endif
			// children
			{
				Sequence node0 = new Sequence();
				node0.SetClassNameString("Sequence");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("FSMAgentTest");
#endif
				bt.AddChild(node0);
				{
					Assignment_bt_node_test_fsm_bt_ref_fsm_node2 node2 = new Assignment_bt_node_test_fsm_bt_ref_fsm_node2();
					node2.SetClassNameString("Assignment");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("FSMAgentTest");
#endif
					node0.AddChild(node2);
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					ReferencedBehavior_bt_node_test_fsm_bt_ref_fsm_node1 node1 = new ReferencedBehavior_bt_node_test_fsm_bt_ref_fsm_node1();
					node1.SetClassNameString("ReferencedBehavior");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("FSMAgentTest");
#endif
					node0.AddChild(node1);
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
Example #16
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("par_test/readonly_default");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("PropertyReadonlyAgent");
#endif
			// children
			{
				Sequence node0 = new Sequence();
				node0.SetClassNameString("Sequence");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("PropertyReadonlyAgent");
#endif
				bt.AddChild(node0);
				{
					Assignment_bt_par_test_readonly_default_node3 node3 = new Assignment_bt_par_test_readonly_default_node3();
					node3.SetClassNameString("Assignment");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("PropertyReadonlyAgent");
#endif
					node0.AddChild(node3);
					node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
				}
				{
					Action_bt_par_test_readonly_default_node1 node1 = new Action_bt_par_test_readonly_default_node1();
					node1.SetClassNameString("Action");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("PropertyReadonlyAgent");
#endif
					node0.AddChild(node1);
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Action_bt_par_test_readonly_default_node2 node2 = new Action_bt_par_test_readonly_default_node2();
					node2.SetClassNameString("Action");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("PropertyReadonlyAgent");
#endif
					node0.AddChild(node2);
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Compute_bt_par_test_readonly_default_node4 node4 = new Compute_bt_par_test_readonly_default_node4();
					node4.SetClassNameString("Compute");
					node4.SetId(4);
#if !BEHAVIAC_RELEASE
					node4.SetAgentType("PropertyReadonlyAgent");
#endif
					node0.AddChild(node4);
					node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
Example #17
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("par_test/property_as_ref_param");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("EmployeeParTestAgent");
#endif
			// pars
			bt.AddPar("EmployeeParTestAgent", "ulong", "par2_ulong_0", "0");
			bt.AddPar("EmployeeParTestAgent", "uint", "par2_uint_0", "0");
			bt.AddPar("EmployeeParTestAgent", "vector<string>", "par2_string_list_0", "0:");
			bt.AddPar("EmployeeParTestAgent", "string", "par2_string_0", "");
			bt.AddPar("EmployeeParTestAgent", "vector<float>", "par2_single_list_0", "0:");
			bt.AddPar("EmployeeParTestAgent", "float", "par2_single_0", "0");
			bt.AddPar("EmployeeParTestAgent", "double", "par2_double_0", "0");
			bt.AddPar("EmployeeParTestAgent", "vector<behaviac.Agent>", "par2_agent_list_0", "0:");
			bt.AddPar("EmployeeParTestAgent", "behaviac.Agent", "par2_agent_0", "null");
			bt.AddPar("EmployeeParTestAgent", "ushort", "par1_ushort_0", "65535");
			bt.AddPar("EmployeeParTestAgent", "vector<TNS.ST.PER.WRK.kEmployee>", "par1_kemployee_list_0", "0:");
			bt.AddPar("EmployeeParTestAgent", "TNS.ST.PER.WRK.kEmployee", "par1_kemployee_0", "{boss=null;car={brand=\"\";color=RED;price=0;};code=c;id=0;isMale=false;name=\"tomlp\";skinColor=RED;weight=0;}");
			bt.AddPar("EmployeeParTestAgent", "long", "par1_long_0", "0");
			bt.AddPar("EmployeeParTestAgent", "vector<int>", "par1_int_list_0", "0:");
			bt.AddPar("EmployeeParTestAgent", "int", "par1_int_0", "0");
			bt.AddPar("EmployeeParTestAgent", "short", "par1_short_0", "0");
			bt.AddPar("EmployeeParTestAgent", "vector<sbyte>", "par0_sbyte_list_0", "0:");
			bt.AddPar("EmployeeParTestAgent", "sbyte", "par0_sbyte_0", "0");
			bt.AddPar("EmployeeParTestAgent", "vector<TNS.NE.NAT.eColor>", "par0_ecolor_list_0", "0:");
			bt.AddPar("EmployeeParTestAgent", "TNS.NE.NAT.eColor", "par0_ecolor_0", "WHITE");
			bt.AddPar("EmployeeParTestAgent", "vector<char>", "par0_char_list_0", "0:");
			bt.AddPar("EmployeeParTestAgent", "char", "par0_char_0", "A");
			bt.AddPar("EmployeeParTestAgent", "vector<byte>", "par0_byte_list_0", "0:");
			bt.AddPar("EmployeeParTestAgent", "byte", "par0_byte_0", "0");
			bt.AddPar("EmployeeParTestAgent", "vector<bool>", "par0_boolean_list_0", "0:");
			bt.AddPar("EmployeeParTestAgent", "bool", "par0_boolean_0", "false");
			// children
			{
				Sequence node13 = new Sequence();
				node13.SetClassNameString("Sequence");
				node13.SetId(13);
#if !BEHAVIAC_RELEASE
				node13.SetAgentType("EmployeeParTestAgent");
#endif
				bt.AddChild(node13);
				{
					Sequence node1 = new Sequence();
					node1.SetClassNameString("Sequence");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("EmployeeParTestAgent");
#endif
					node13.AddChild(node1);
					{
						Action_bt_par_test_property_as_ref_param_node0 node0 = new Action_bt_par_test_property_as_ref_param_node0();
						node0.SetClassNameString("Action");
						node0.SetId(0);
#if !BEHAVIAC_RELEASE
						node0.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node0);
						node1.SetHasEvents(node1.HasEvents() | node0.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node17 node17 = new Action_bt_par_test_property_as_ref_param_node17();
						node17.SetClassNameString("Action");
						node17.SetId(17);
#if !BEHAVIAC_RELEASE
						node17.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node17);
						node1.SetHasEvents(node1.HasEvents() | node17.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node2 node2 = new Action_bt_par_test_property_as_ref_param_node2();
						node2.SetClassNameString("Action");
						node2.SetId(2);
#if !BEHAVIAC_RELEASE
						node2.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node2);
						node1.SetHasEvents(node1.HasEvents() | node2.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node3 node3 = new Action_bt_par_test_property_as_ref_param_node3();
						node3.SetClassNameString("Action");
						node3.SetId(3);
#if !BEHAVIAC_RELEASE
						node3.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node3);
						node1.SetHasEvents(node1.HasEvents() | node3.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node4 node4 = new Action_bt_par_test_property_as_ref_param_node4();
						node4.SetClassNameString("Action");
						node4.SetId(4);
#if !BEHAVIAC_RELEASE
						node4.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node4);
						node1.SetHasEvents(node1.HasEvents() | node4.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node5 node5 = new Action_bt_par_test_property_as_ref_param_node5();
						node5.SetClassNameString("Action");
						node5.SetId(5);
#if !BEHAVIAC_RELEASE
						node5.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node5);
						node1.SetHasEvents(node1.HasEvents() | node5.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node32 node32 = new Action_bt_par_test_property_as_ref_param_node32();
						node32.SetClassNameString("Action");
						node32.SetId(32);
#if !BEHAVIAC_RELEASE
						node32.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node32);
						node1.SetHasEvents(node1.HasEvents() | node32.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node6 node6 = new Action_bt_par_test_property_as_ref_param_node6();
						node6.SetClassNameString("Action");
						node6.SetId(6);
#if !BEHAVIAC_RELEASE
						node6.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node6);
						node1.SetHasEvents(node1.HasEvents() | node6.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node7 node7 = new Action_bt_par_test_property_as_ref_param_node7();
						node7.SetClassNameString("Action");
						node7.SetId(7);
#if !BEHAVIAC_RELEASE
						node7.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node7);
						node1.SetHasEvents(node1.HasEvents() | node7.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node8 node8 = new Action_bt_par_test_property_as_ref_param_node8();
						node8.SetClassNameString("Action");
						node8.SetId(8);
#if !BEHAVIAC_RELEASE
						node8.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node8);
						node1.SetHasEvents(node1.HasEvents() | node8.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node30 node30 = new Action_bt_par_test_property_as_ref_param_node30();
						node30.SetClassNameString("Action");
						node30.SetId(30);
#if !BEHAVIAC_RELEASE
						node30.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node30);
						node1.SetHasEvents(node1.HasEvents() | node30.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node31 node31 = new Action_bt_par_test_property_as_ref_param_node31();
						node31.SetClassNameString("Action");
						node31.SetId(31);
#if !BEHAVIAC_RELEASE
						node31.SetAgentType("EmployeeParTestAgent");
#endif
						node1.AddChild(node31);
						node1.SetHasEvents(node1.HasEvents() | node31.HasEvents());
					}
					node13.SetHasEvents(node13.HasEvents() | node1.HasEvents());
				}
				{
					Sequence node14 = new Sequence();
					node14.SetClassNameString("Sequence");
					node14.SetId(14);
#if !BEHAVIAC_RELEASE
					node14.SetAgentType("EmployeeParTestAgent");
#endif
					node13.AddChild(node14);
					{
						Action_bt_par_test_property_as_ref_param_node9 node9 = new Action_bt_par_test_property_as_ref_param_node9();
						node9.SetClassNameString("Action");
						node9.SetId(9);
#if !BEHAVIAC_RELEASE
						node9.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node9);
						node14.SetHasEvents(node14.HasEvents() | node9.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node10 node10 = new Action_bt_par_test_property_as_ref_param_node10();
						node10.SetClassNameString("Action");
						node10.SetId(10);
#if !BEHAVIAC_RELEASE
						node10.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node10);
						node14.SetHasEvents(node14.HasEvents() | node10.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node11 node11 = new Action_bt_par_test_property_as_ref_param_node11();
						node11.SetClassNameString("Action");
						node11.SetId(11);
#if !BEHAVIAC_RELEASE
						node11.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node11);
						node14.SetHasEvents(node14.HasEvents() | node11.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node12 node12 = new Action_bt_par_test_property_as_ref_param_node12();
						node12.SetClassNameString("Action");
						node12.SetId(12);
#if !BEHAVIAC_RELEASE
						node12.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node12);
						node14.SetHasEvents(node14.HasEvents() | node12.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node18 node18 = new Action_bt_par_test_property_as_ref_param_node18();
						node18.SetClassNameString("Action");
						node18.SetId(18);
#if !BEHAVIAC_RELEASE
						node18.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node18);
						node14.SetHasEvents(node14.HasEvents() | node18.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node19 node19 = new Action_bt_par_test_property_as_ref_param_node19();
						node19.SetClassNameString("Action");
						node19.SetId(19);
#if !BEHAVIAC_RELEASE
						node19.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node19);
						node14.SetHasEvents(node14.HasEvents() | node19.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node20 node20 = new Action_bt_par_test_property_as_ref_param_node20();
						node20.SetClassNameString("Action");
						node20.SetId(20);
#if !BEHAVIAC_RELEASE
						node20.SetAgentType("EmployeeParTestAgent");
#endif
						node14.AddChild(node20);
						node14.SetHasEvents(node14.HasEvents() | node20.HasEvents());
					}
					node13.SetHasEvents(node13.HasEvents() | node14.HasEvents());
				}
				{
					Sequence node22 = new Sequence();
					node22.SetClassNameString("Sequence");
					node22.SetId(22);
#if !BEHAVIAC_RELEASE
					node22.SetAgentType("EmployeeParTestAgent");
#endif
					node13.AddChild(node22);
					{
						Action_bt_par_test_property_as_ref_param_node16 node16 = new Action_bt_par_test_property_as_ref_param_node16();
						node16.SetClassNameString("Action");
						node16.SetId(16);
#if !BEHAVIAC_RELEASE
						node16.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node16);
						node22.SetHasEvents(node22.HasEvents() | node16.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node21 node21 = new Action_bt_par_test_property_as_ref_param_node21();
						node21.SetClassNameString("Action");
						node21.SetId(21);
#if !BEHAVIAC_RELEASE
						node21.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node21);
						node22.SetHasEvents(node22.HasEvents() | node21.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node15 node15 = new Action_bt_par_test_property_as_ref_param_node15();
						node15.SetClassNameString("Action");
						node15.SetId(15);
#if !BEHAVIAC_RELEASE
						node15.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node15);
						node22.SetHasEvents(node22.HasEvents() | node15.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node29 node29 = new Action_bt_par_test_property_as_ref_param_node29();
						node29.SetClassNameString("Action");
						node29.SetId(29);
#if !BEHAVIAC_RELEASE
						node29.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node29);
						node22.SetHasEvents(node22.HasEvents() | node29.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node26 node26 = new Action_bt_par_test_property_as_ref_param_node26();
						node26.SetClassNameString("Action");
						node26.SetId(26);
#if !BEHAVIAC_RELEASE
						node26.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node26);
						node22.SetHasEvents(node22.HasEvents() | node26.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node27 node27 = new Action_bt_par_test_property_as_ref_param_node27();
						node27.SetClassNameString("Action");
						node27.SetId(27);
#if !BEHAVIAC_RELEASE
						node27.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node27);
						node22.SetHasEvents(node22.HasEvents() | node27.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node24 node24 = new Action_bt_par_test_property_as_ref_param_node24();
						node24.SetClassNameString("Action");
						node24.SetId(24);
#if !BEHAVIAC_RELEASE
						node24.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node24);
						node22.SetHasEvents(node22.HasEvents() | node24.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node25 node25 = new Action_bt_par_test_property_as_ref_param_node25();
						node25.SetClassNameString("Action");
						node25.SetId(25);
#if !BEHAVIAC_RELEASE
						node25.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node25);
						node22.SetHasEvents(node22.HasEvents() | node25.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node23 node23 = new Action_bt_par_test_property_as_ref_param_node23();
						node23.SetClassNameString("Action");
						node23.SetId(23);
#if !BEHAVIAC_RELEASE
						node23.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node23);
						node22.SetHasEvents(node22.HasEvents() | node23.HasEvents());
					}
					{
						Action_bt_par_test_property_as_ref_param_node28 node28 = new Action_bt_par_test_property_as_ref_param_node28();
						node28.SetClassNameString("Action");
						node28.SetId(28);
#if !BEHAVIAC_RELEASE
						node28.SetAgentType("EmployeeParTestAgent");
#endif
						node22.AddChild(node28);
						node22.SetHasEvents(node22.HasEvents() | node28.HasEvents());
					}
					node13.SetHasEvents(node13.HasEvents() | node22.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node13.HasEvents());
			}
			return true;
		}
Example #18
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/htn/house/construct");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("HTNAgentHouse");
#endif
			// children
			{
				Task_bt_node_test_htn_house_construct_node0 node0 = new Task_bt_node_test_htn_house_construct_node0();
				node0.SetClassNameString("Task");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("HTNAgentHouse");
#endif
				// attachments
				{
					Precondition_bt_node_test_htn_house_construct_attach1 attach1 = new Precondition_bt_node_test_htn_house_construct_attach1();
					attach1.SetClassNameString("Precondition");
					attach1.SetId(1);
#if !BEHAVIAC_RELEASE
					attach1.SetAgentType("HTNAgentHouse");
#endif
					node0.Attach(attach1, true, false, false);
				}
				{
					Effector_bt_node_test_htn_house_construct_attach2 attach2 = new Effector_bt_node_test_htn_house_construct_attach2();
					attach2.SetClassNameString("Effector");
					attach2.SetId(2);
#if !BEHAVIAC_RELEASE
					attach2.SetAgentType("HTNAgentHouse");
#endif
					node0.Attach(attach2, false, true, false);
				}
				bt.AddChild(node0);
				{
					Method node9 = new Method();
					node9.SetClassNameString("Method");
					node9.SetId(9);
#if !BEHAVIAC_RELEASE
					node9.SetAgentType("HTNAgentHouse");
#endif
					node0.AddChild(node9);
					{
						Sequence node10 = new Sequence();
						node10.SetClassNameString("Sequence");
						node10.SetId(10);
#if !BEHAVIAC_RELEASE
						node10.SetAgentType("HTNAgentHouse");
#endif
						node9.AddChild(node10);
						{
							Action_bt_node_test_htn_house_construct_node3 node3 = new Action_bt_node_test_htn_house_construct_node3();
							node3.SetClassNameString("Action");
							node3.SetId(3);
#if !BEHAVIAC_RELEASE
							node3.SetAgentType("HTNAgentHouse");
#endif
							node10.AddChild(node3);
							node10.SetHasEvents(node10.HasEvents() | node3.HasEvents());
						}
						{
							Action_bt_node_test_htn_house_construct_node4 node4 = new Action_bt_node_test_htn_house_construct_node4();
							node4.SetClassNameString("Action");
							node4.SetId(4);
#if !BEHAVIAC_RELEASE
							node4.SetAgentType("HTNAgentHouse");
#endif
							node10.AddChild(node4);
							node10.SetHasEvents(node10.HasEvents() | node4.HasEvents());
						}
						{
							Parallel_bt_node_test_htn_house_construct_node5 node5 = new Parallel_bt_node_test_htn_house_construct_node5();
							node5.SetClassNameString("Parallel");
							node5.SetId(5);
#if !BEHAVIAC_RELEASE
							node5.SetAgentType("HTNAgentHouse");
#endif
							node10.AddChild(node5);
							{
								Action_bt_node_test_htn_house_construct_node6 node6 = new Action_bt_node_test_htn_house_construct_node6();
								node6.SetClassNameString("Action");
								node6.SetId(6);
#if !BEHAVIAC_RELEASE
								node6.SetAgentType("HTNAgentHouse");
#endif
								node5.AddChild(node6);
								node5.SetHasEvents(node5.HasEvents() | node6.HasEvents());
							}
							{
								Action_bt_node_test_htn_house_construct_node7 node7 = new Action_bt_node_test_htn_house_construct_node7();
								node7.SetClassNameString("Action");
								node7.SetId(7);
#if !BEHAVIAC_RELEASE
								node7.SetAgentType("HTNAgentHouse");
#endif
								node5.AddChild(node7);
								node5.SetHasEvents(node5.HasEvents() | node7.HasEvents());
							}
							node10.SetHasEvents(node10.HasEvents() | node5.HasEvents());
						}
						{
							Action_bt_node_test_htn_house_construct_node8 node8 = new Action_bt_node_test_htn_house_construct_node8();
							node8.SetClassNameString("Action");
							node8.SetId(8);
#if !BEHAVIAC_RELEASE
							node8.SetAgentType("HTNAgentHouse");
#endif
							node10.AddChild(node8);
							node10.SetHasEvents(node10.HasEvents() | node8.HasEvents());
						}
						node9.SetHasEvents(node9.HasEvents() | node10.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node9.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
Example #19
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/PreconditionEffectorTest/PreconditionEffectorTest_3");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("PreconEffectorAgent");
#endif
			// children
			{
				DecoratorLoop_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node7 node7 = new DecoratorLoop_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node7();
				node7.SetClassNameString("DecoratorLoop");
				node7.SetId(7);
#if !BEHAVIAC_RELEASE
				node7.SetAgentType("PreconEffectorAgent");
#endif
				bt.AddChild(node7);
				{
					SelectorLoop node6 = new SelectorLoop();
					node6.SetClassNameString("SelectorLoop");
					node6.SetId(6);
#if !BEHAVIAC_RELEASE
					node6.SetAgentType("PreconEffectorAgent");
#endif
					node7.AddChild(node6);
					{
						WithPrecondition node5 = new WithPrecondition();
						node5.SetClassNameString("WithPrecondition");
						node5.SetId(5);
#if !BEHAVIAC_RELEASE
						node5.SetAgentType("PreconEffectorAgent");
#endif
						node6.AddChild(node5);
						{
							Condition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node13 node13 = new Condition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node13();
							node13.SetClassNameString("Condition");
							node13.SetId(13);
#if !BEHAVIAC_RELEASE
							node13.SetAgentType("PreconEffectorAgent");
#endif
							node5.AddChild(node13);
							node5.SetHasEvents(node5.HasEvents() | node13.HasEvents());
						}
						{
							Sequence node11 = new Sequence();
							node11.SetClassNameString("Sequence");
							node11.SetId(11);
#if !BEHAVIAC_RELEASE
							node11.SetAgentType("PreconEffectorAgent");
#endif
							// attachments
							{
								Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach16 attach16 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach16();
								attach16.SetClassNameString("Effector");
								attach16.SetId(16);
#if !BEHAVIAC_RELEASE
								attach16.SetAgentType("PreconEffectorAgent");
#endif
								node11.Attach(attach16, false, true, false);
							}
							node5.AddChild(node11);
							{
								Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node4 node4 = new Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node4();
								node4.SetClassNameString("Action");
								node4.SetId(4);
#if !BEHAVIAC_RELEASE
								node4.SetAgentType("PreconEffectorAgent");
#endif
								// attachments
								{
									Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach8 attach8 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach8();
									attach8.SetClassNameString("Effector");
									attach8.SetId(8);
#if !BEHAVIAC_RELEASE
									attach8.SetAgentType("PreconEffectorAgent");
#endif
									node4.Attach(attach8, false, true, false);
								}
								{
									Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach19 attach19 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach19();
									attach19.SetClassNameString("Effector");
									attach19.SetId(19);
#if !BEHAVIAC_RELEASE
									attach19.SetAgentType("PreconEffectorAgent");
#endif
									node4.Attach(attach19, false, true, false);
								}
								node11.AddChild(node4);
								node11.SetHasEvents(node11.HasEvents() | node4.HasEvents());
							}
							{
								Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node9 node9 = new Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node9();
								node9.SetClassNameString("Action");
								node9.SetId(9);
#if !BEHAVIAC_RELEASE
								node9.SetAgentType("PreconEffectorAgent");
#endif
								// attachments
								{
									Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach2 attach2 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach2();
									attach2.SetClassNameString("Effector");
									attach2.SetId(2);
#if !BEHAVIAC_RELEASE
									attach2.SetAgentType("PreconEffectorAgent");
#endif
									node9.Attach(attach2, false, true, false);
								}
								{
									Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach18 attach18 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach18();
									attach18.SetClassNameString("Effector");
									attach18.SetId(18);
#if !BEHAVIAC_RELEASE
									attach18.SetAgentType("PreconEffectorAgent");
#endif
									node9.Attach(attach18, false, true, false);
								}
								node11.AddChild(node9);
								node11.SetHasEvents(node11.HasEvents() | node9.HasEvents());
							}
							node5.SetHasEvents(node5.HasEvents() | node11.HasEvents());
						}
						node6.SetHasEvents(node6.HasEvents() | node5.HasEvents());
					}
					{
						WithPrecondition node0 = new WithPrecondition();
						node0.SetClassNameString("WithPrecondition");
						node0.SetId(0);
#if !BEHAVIAC_RELEASE
						node0.SetAgentType("PreconEffectorAgent");
#endif
						node6.AddChild(node0);
						{
							Condition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node12 node12 = new Condition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node12();
							node12.SetClassNameString("Condition");
							node12.SetId(12);
#if !BEHAVIAC_RELEASE
							node12.SetAgentType("PreconEffectorAgent");
#endif
							node0.AddChild(node12);
							node0.SetHasEvents(node0.HasEvents() | node12.HasEvents());
						}
						{
							Sequence node14 = new Sequence();
							node14.SetClassNameString("Sequence");
							node14.SetId(14);
#if !BEHAVIAC_RELEASE
							node14.SetAgentType("PreconEffectorAgent");
#endif
							// attachments
							{
								Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach17 attach17 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach17();
								attach17.SetClassNameString("Effector");
								attach17.SetId(17);
#if !BEHAVIAC_RELEASE
								attach17.SetAgentType("PreconEffectorAgent");
#endif
								node14.Attach(attach17, false, true, false);
							}
							node0.AddChild(node14);
							{
								Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node10 node10 = new Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node10();
								node10.SetClassNameString("Action");
								node10.SetId(10);
#if !BEHAVIAC_RELEASE
								node10.SetAgentType("PreconEffectorAgent");
#endif
								// attachments
								{
									Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach15 attach15 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach15();
									attach15.SetClassNameString("Effector");
									attach15.SetId(15);
#if !BEHAVIAC_RELEASE
									attach15.SetAgentType("PreconEffectorAgent");
#endif
									node10.Attach(attach15, false, true, false);
								}
								{
									Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach20 attach20 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach20();
									attach20.SetClassNameString("Effector");
									attach20.SetId(20);
#if !BEHAVIAC_RELEASE
									attach20.SetAgentType("PreconEffectorAgent");
#endif
									node10.Attach(attach20, false, true, false);
								}
								node14.AddChild(node10);
								node14.SetHasEvents(node14.HasEvents() | node10.HasEvents());
							}
							{
								Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node1 node1 = new Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_node1();
								node1.SetClassNameString("Action");
								node1.SetId(1);
#if !BEHAVIAC_RELEASE
								node1.SetAgentType("PreconEffectorAgent");
#endif
								// attachments
								{
									Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach21 attach21 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach21();
									attach21.SetClassNameString("Effector");
									attach21.SetId(21);
#if !BEHAVIAC_RELEASE
									attach21.SetAgentType("PreconEffectorAgent");
#endif
									node1.Attach(attach21, false, true, false);
								}
								{
									Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach3 attach3 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_3_attach3();
									attach3.SetClassNameString("Effector");
									attach3.SetId(3);
#if !BEHAVIAC_RELEASE
									attach3.SetAgentType("PreconEffectorAgent");
#endif
									node1.Attach(attach3, false, true, false);
								}
								node14.AddChild(node1);
								node14.SetHasEvents(node14.HasEvents() | node1.HasEvents());
							}
							node0.SetHasEvents(node0.HasEvents() | node14.HasEvents());
						}
						node6.SetHasEvents(node6.HasEvents() | node0.HasEvents());
					}
					node7.SetHasEvents(node7.HasEvents() | node6.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node7.HasEvents());
			}
			return true;
		}
Example #20
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/htn/house/root");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("HTNAgentHouse");
#endif
			// children
			{
				Task_bt_node_test_htn_house_root_node1 node1 = new Task_bt_node_test_htn_house_root_node1();
				node1.SetClassNameString("Task");
				node1.SetId(1);
#if !BEHAVIAC_RELEASE
				node1.SetAgentType("HTNAgentHouse");
#endif
				bt.AddChild(node1);
				{
					Method node0 = new Method();
					node0.SetClassNameString("Method");
					node0.SetId(0);
#if !BEHAVIAC_RELEASE
					node0.SetAgentType("HTNAgentHouse");
#endif
					node1.AddChild(node0);
					{
						Sequence node2 = new Sequence();
						node2.SetClassNameString("Sequence");
						node2.SetId(2);
#if !BEHAVIAC_RELEASE
						node2.SetAgentType("HTNAgentHouse");
#endif
						node0.AddChild(node2);
						{
							Parallel_bt_node_test_htn_house_root_node12 node12 = new Parallel_bt_node_test_htn_house_root_node12();
							node12.SetClassNameString("Parallel");
							node12.SetId(12);
#if !BEHAVIAC_RELEASE
							node12.SetAgentType("HTNAgentHouse");
#endif
							node2.AddChild(node12);
							{
								Action_bt_node_test_htn_house_root_node4 node4 = new Action_bt_node_test_htn_house_root_node4();
								node4.SetClassNameString("Action");
								node4.SetId(4);
#if !BEHAVIAC_RELEASE
								node4.SetAgentType("HTNAgentHouse");
#endif
								// attachments
								{
									Precondition_bt_node_test_htn_house_root_attach3 attach3 = new Precondition_bt_node_test_htn_house_root_attach3();
									attach3.SetClassNameString("Precondition");
									attach3.SetId(3);
#if !BEHAVIAC_RELEASE
									attach3.SetAgentType("HTNAgentHouse");
#endif
									node4.Attach(attach3, true, false, false);
								}
								{
									Effector_bt_node_test_htn_house_root_attach5 attach5 = new Effector_bt_node_test_htn_house_root_attach5();
									attach5.SetClassNameString("Effector");
									attach5.SetId(5);
#if !BEHAVIAC_RELEASE
									attach5.SetAgentType("HTNAgentHouse");
#endif
									node4.Attach(attach5, false, true, false);
								}
								{
									Effector_bt_node_test_htn_house_root_attach6 attach6 = new Effector_bt_node_test_htn_house_root_attach6();
									attach6.SetClassNameString("Effector");
									attach6.SetId(6);
#if !BEHAVIAC_RELEASE
									attach6.SetAgentType("HTNAgentHouse");
#endif
									node4.Attach(attach6, false, true, false);
								}
								node12.AddChild(node4);
								node12.SetHasEvents(node12.HasEvents() | node4.HasEvents());
							}
							{
								Action_bt_node_test_htn_house_root_node8 node8 = new Action_bt_node_test_htn_house_root_node8();
								node8.SetClassNameString("Action");
								node8.SetId(8);
#if !BEHAVIAC_RELEASE
								node8.SetAgentType("HTNAgentHouse");
#endif
								// attachments
								{
									Precondition_bt_node_test_htn_house_root_attach7 attach7 = new Precondition_bt_node_test_htn_house_root_attach7();
									attach7.SetClassNameString("Precondition");
									attach7.SetId(7);
#if !BEHAVIAC_RELEASE
									attach7.SetAgentType("HTNAgentHouse");
#endif
									node8.Attach(attach7, true, false, false);
								}
								{
									Effector_bt_node_test_htn_house_root_attach9 attach9 = new Effector_bt_node_test_htn_house_root_attach9();
									attach9.SetClassNameString("Effector");
									attach9.SetId(9);
#if !BEHAVIAC_RELEASE
									attach9.SetAgentType("HTNAgentHouse");
#endif
									node8.Attach(attach9, false, true, false);
								}
								{
									Effector_bt_node_test_htn_house_root_attach10 attach10 = new Effector_bt_node_test_htn_house_root_attach10();
									attach10.SetClassNameString("Effector");
									attach10.SetId(10);
#if !BEHAVIAC_RELEASE
									attach10.SetAgentType("HTNAgentHouse");
#endif
									node8.Attach(attach10, false, true, false);
								}
								node12.AddChild(node8);
								node12.SetHasEvents(node12.HasEvents() | node8.HasEvents());
							}
							node2.SetHasEvents(node2.HasEvents() | node12.HasEvents());
						}
						{
							ReferencedBehavior_bt_node_test_htn_house_root_node11 node11 = new ReferencedBehavior_bt_node_test_htn_house_root_node11();
							node11.SetClassNameString("ReferencedBehavior");
							node11.SetId(11);
#if !BEHAVIAC_RELEASE
							node11.SetAgentType("HTNAgentHouse");
#endif
							node2.AddChild(node11);
							node2.SetHasEvents(node2.HasEvents() | node11.HasEvents());
						}
						node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
					}
					node1.SetHasEvents(node1.HasEvents() | node0.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node1.HasEvents());
			}
			return true;
		}
Example #21
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/repeat/repeat_ut_1");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// children
			{
				Sequence node2 = new Sequence();
				node2.SetClassNameString("Sequence");
				node2.SetId(2);
#if !BEHAVIAC_RELEASE
				node2.SetAgentType("AgentNodeTest");
#endif
				bt.AddChild(node2);
				{
					Assignment_bt_node_test_repeat_repeat_ut_1_node3 node3 = new Assignment_bt_node_test_repeat_repeat_ut_1_node3();
					node3.SetClassNameString("Assignment");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("AgentNodeTest");
#endif
					node2.AddChild(node3);
					node2.SetHasEvents(node2.HasEvents() | node3.HasEvents());
				}
				{
					DecoratorLoop_bt_node_test_repeat_repeat_ut_1_node0 node0 = new DecoratorLoop_bt_node_test_repeat_repeat_ut_1_node0();
					node0.SetClassNameString("DecoratorLoop");
					node0.SetId(0);
#if !BEHAVIAC_RELEASE
					node0.SetAgentType("AgentNodeTest");
#endif
					node2.AddChild(node0);
					{
						Compute_bt_node_test_repeat_repeat_ut_1_node1 node1 = new Compute_bt_node_test_repeat_repeat_ut_1_node1();
						node1.SetClassNameString("Compute");
						node1.SetId(1);
#if !BEHAVIAC_RELEASE
						node1.SetAgentType("AgentNodeTest");
#endif
						node0.AddChild(node1);
						node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
					}
					node2.SetHasEvents(node2.HasEvents() | node0.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node2.HasEvents());
			}
			return true;
		}
Example #22
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/htn/travel/root");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("HTNAgentTravel");
#endif
			// pars
			bt.AddPar("HTNAgentTravel", "int", "start", "0");
			bt.AddPar("HTNAgentTravel", "int", "finish", "0");
			// children
			{
				Task_bt_node_test_htn_travel_root_node1 node1 = new Task_bt_node_test_htn_travel_root_node1();
				node1.SetClassNameString("Task");
				node1.SetId(1);
#if !BEHAVIAC_RELEASE
				node1.SetAgentType("HTNAgentTravel");
#endif
				bt.AddChild(node1);
				{
					Method node2 = new Method();
					node2.SetClassNameString("Method");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("HTNAgentTravel");
#endif
					// attachments
					{
						Precondition_bt_node_test_htn_travel_root_attach0 attach0 = new Precondition_bt_node_test_htn_travel_root_attach0();
						attach0.SetClassNameString("Precondition");
						attach0.SetId(0);
#if !BEHAVIAC_RELEASE
						attach0.SetAgentType("HTNAgentTravel");
#endif
						node2.Attach(attach0, true, false, false);
					}
					{
						Precondition_bt_node_test_htn_travel_root_attach3 attach3 = new Precondition_bt_node_test_htn_travel_root_attach3();
						attach3.SetClassNameString("Precondition");
						attach3.SetId(3);
#if !BEHAVIAC_RELEASE
						attach3.SetAgentType("HTNAgentTravel");
#endif
						node2.Attach(attach3, true, false, false);
					}
					node1.AddChild(node2);
					{
						ReferencedBehavior_bt_node_test_htn_travel_root_node4 node4 = new ReferencedBehavior_bt_node_test_htn_travel_root_node4();
						node4.SetClassNameString("ReferencedBehavior");
						node4.SetId(4);
#if !BEHAVIAC_RELEASE
						node4.SetAgentType("HTNAgentTravel");
#endif
						node2.AddChild(node4);
						node2.SetHasEvents(node2.HasEvents() | node4.HasEvents());
					}
					node1.SetHasEvents(node1.HasEvents() | node2.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node1.HasEvents());
			}
			return true;
		}
Example #23
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/action_ut_3");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// pars
			bt.AddPar("AgentNodeTest", "float", "par_float_type_0", "0");
			bt.AddPar("AgentNodeTest", "float", "par_float_type_1", "0");
			bt.AddPar("AgentNodeTest", "float", "par_float_type_2", "0.6");
			// children
			{
				Sequence node0 = new Sequence();
				node0.SetClassNameString("Sequence");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("AgentNodeTest");
#endif
				bt.AddChild(node0);
				{
					Action_bt_node_test_action_ut_3_node14 node14 = new Action_bt_node_test_action_ut_3_node14();
					node14.SetClassNameString("Action");
					node14.SetId(14);
#if !BEHAVIAC_RELEASE
					node14.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node14);
					node0.SetHasEvents(node0.HasEvents() | node14.HasEvents());
				}
				{
					Assignment_bt_node_test_action_ut_3_node7 node7 = new Assignment_bt_node_test_action_ut_3_node7();
					node7.SetClassNameString("Assignment");
					node7.SetId(7);
#if !BEHAVIAC_RELEASE
					node7.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node7);
					node0.SetHasEvents(node0.HasEvents() | node7.HasEvents());
				}
				{
					Condition_bt_node_test_action_ut_3_node8 node8 = new Condition_bt_node_test_action_ut_3_node8();
					node8.SetClassNameString("Condition");
					node8.SetId(8);
#if !BEHAVIAC_RELEASE
					node8.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node8);
					node0.SetHasEvents(node0.HasEvents() | node8.HasEvents());
				}
				{
					Compute_bt_node_test_action_ut_3_node3 node3 = new Compute_bt_node_test_action_ut_3_node3();
					node3.SetClassNameString("Compute");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node3);
					node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
				}
				{
					Action_bt_node_test_action_ut_3_node2 node2 = new Action_bt_node_test_action_ut_3_node2();
					node2.SetClassNameString("Action");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node2);
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Assignment_bt_node_test_action_ut_3_node1 node1 = new Assignment_bt_node_test_action_ut_3_node1();
					node1.SetClassNameString("Assignment");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node1);
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Compute_bt_node_test_action_ut_3_node4 node4 = new Compute_bt_node_test_action_ut_3_node4();
					node4.SetClassNameString("Compute");
					node4.SetId(4);
#if !BEHAVIAC_RELEASE
					node4.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node4);
					node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
				}
				{
					Action_bt_node_test_action_ut_3_node5 node5 = new Action_bt_node_test_action_ut_3_node5();
					node5.SetClassNameString("Action");
					node5.SetId(5);
#if !BEHAVIAC_RELEASE
					node5.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node5);
					node0.SetHasEvents(node0.HasEvents() | node5.HasEvents());
				}
				{
					Condition_bt_node_test_action_ut_3_node6 node6 = new Condition_bt_node_test_action_ut_3_node6();
					node6.SetClassNameString("Condition");
					node6.SetId(6);
#if !BEHAVIAC_RELEASE
					node6.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node6);
					node0.SetHasEvents(node0.HasEvents() | node6.HasEvents());
				}
				{
					Assignment_bt_node_test_action_ut_3_node9 node9 = new Assignment_bt_node_test_action_ut_3_node9();
					node9.SetClassNameString("Assignment");
					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;
		}
Example #24
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/htn/travel/travel");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("HTNAgentTravel");
#endif
			// pars
			bt.AddPar("HTNAgentTravel", "int", "_$local_task_param_$_0", "0");
			bt.AddPar("HTNAgentTravel", "int", "_$local_task_param_$_1", "0");
			// children
			{
				Task_bt_node_test_htn_travel_travel_node0 node0 = new Task_bt_node_test_htn_travel_travel_node0();
				node0.SetClassNameString("Task");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("HTNAgentTravel");
#endif
				bt.AddChild(node0);
				{
					Method node2 = new Method();
					node2.SetClassNameString("Method");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("HTNAgentTravel");
#endif
					// attachments
					{
						Precondition_bt_node_test_htn_travel_travel_attach1 attach1 = new Precondition_bt_node_test_htn_travel_travel_attach1();
						attach1.SetClassNameString("Precondition");
						attach1.SetId(1);
#if !BEHAVIAC_RELEASE
						attach1.SetAgentType("HTNAgentTravel");
#endif
						node2.Attach(attach1, true, false, false);
					}
					node0.AddChild(node2);
					{
						Action_bt_node_test_htn_travel_travel_node3 node3 = new Action_bt_node_test_htn_travel_travel_node3();
						node3.SetClassNameString("Action");
						node3.SetId(3);
#if !BEHAVIAC_RELEASE
						node3.SetAgentType("HTNAgentTravel");
#endif
						node2.AddChild(node3);
						node2.SetHasEvents(node2.HasEvents() | node3.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Method node5 = new Method();
					node5.SetClassNameString("Method");
					node5.SetId(5);
#if !BEHAVIAC_RELEASE
					node5.SetAgentType("HTNAgentTravel");
#endif
					// attachments
					{
						Precondition_bt_node_test_htn_travel_travel_attach4 attach4 = new Precondition_bt_node_test_htn_travel_travel_attach4();
						attach4.SetClassNameString("Precondition");
						attach4.SetId(4);
#if !BEHAVIAC_RELEASE
						attach4.SetAgentType("HTNAgentTravel");
#endif
						node5.Attach(attach4, true, false, false);
					}
					node0.AddChild(node5);
					{
						ReferencedBehavior_bt_node_test_htn_travel_travel_node6 node6 = new ReferencedBehavior_bt_node_test_htn_travel_travel_node6();
						node6.SetClassNameString("ReferencedBehavior");
						node6.SetId(6);
#if !BEHAVIAC_RELEASE
						node6.SetAgentType("HTNAgentTravel");
#endif
						node5.AddChild(node6);
						node5.SetHasEvents(node5.HasEvents() | node6.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node5.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
Example #25
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/action_waitframes_ut_0");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// pars
			bt.AddPar("AgentNodeTest", "int", "par_frame_count", "5");
			// children
			{
				Sequence node0 = new Sequence();
				node0.SetClassNameString("Sequence");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("AgentNodeTest");
#endif
				bt.AddChild(node0);
				{
					Assignment_bt_node_test_action_waitframes_ut_0_node3 node3 = new Assignment_bt_node_test_action_waitframes_ut_0_node3();
					node3.SetClassNameString("Assignment");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node3);
					node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
				}
				{
					WaitFrames_bt_node_test_action_waitframes_ut_0_node1 node1 = new WaitFrames_bt_node_test_action_waitframes_ut_0_node1();
					node1.SetClassNameString("WaitFrames");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node1);
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Assignment_bt_node_test_action_waitframes_ut_0_node4 node4 = new Assignment_bt_node_test_action_waitframes_ut_0_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;
		}
Example #26
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/htn/travel/travel_by_air");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("HTNAgentTravel");
#endif
			// pars
			bt.AddPar("HTNAgentTravel", "int", "ax", "0");
			bt.AddPar("HTNAgentTravel", "int", "ay", "0");
			bt.AddPar("HTNAgentTravel", "vector<int>", "as", "0:");
			bt.AddPar("HTNAgentTravel", "int", "_$local_task_param_$_0", "0");
			bt.AddPar("HTNAgentTravel", "int", "_$local_task_param_$_1", "0");
			// children
			{
				Task_bt_node_test_htn_travel_travel_by_air_node0 node0 = new Task_bt_node_test_htn_travel_travel_by_air_node0();
				node0.SetClassNameString("Task");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("HTNAgentTravel");
#endif
				bt.AddChild(node0);
				{
					Method node1 = new Method();
					node1.SetClassNameString("Method");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("HTNAgentTravel");
#endif
					// attachments
					{
						Precondition_bt_node_test_htn_travel_travel_by_air_attach2 attach2 = new Precondition_bt_node_test_htn_travel_travel_by_air_attach2();
						attach2.SetClassNameString("Precondition");
						attach2.SetId(2);
#if !BEHAVIAC_RELEASE
						attach2.SetAgentType("HTNAgentTravel");
#endif
						node1.Attach(attach2, true, false, false);
					}
					{
						Precondition_bt_node_test_htn_travel_travel_by_air_attach3 attach3 = new Precondition_bt_node_test_htn_travel_travel_by_air_attach3();
						attach3.SetClassNameString("Precondition");
						attach3.SetId(3);
#if !BEHAVIAC_RELEASE
						attach3.SetAgentType("HTNAgentTravel");
#endif
						node1.Attach(attach3, true, false, false);
					}
					node0.AddChild(node1);
					{
						DecoratorIterator_bt_node_test_htn_travel_travel_by_air_node5 node5 = new DecoratorIterator_bt_node_test_htn_travel_travel_by_air_node5();
						node5.SetClassNameString("DecoratorIterator");
						node5.SetId(5);
#if !BEHAVIAC_RELEASE
						node5.SetAgentType("HTNAgentTravel");
#endif
						node1.AddChild(node5);
						{
							Sequence node6 = new Sequence();
							node6.SetClassNameString("Sequence");
							node6.SetId(6);
#if !BEHAVIAC_RELEASE
							node6.SetAgentType("HTNAgentTravel");
#endif
							node5.AddChild(node6);
							{
								ReferencedBehavior_bt_node_test_htn_travel_travel_by_air_node8 node8 = new ReferencedBehavior_bt_node_test_htn_travel_travel_by_air_node8();
								node8.SetClassNameString("ReferencedBehavior");
								node8.SetId(8);
#if !BEHAVIAC_RELEASE
								node8.SetAgentType("HTNAgentTravel");
#endif
								node6.AddChild(node8);
								node6.SetHasEvents(node6.HasEvents() | node8.HasEvents());
							}
							{
								Action_bt_node_test_htn_travel_travel_by_air_node7 node7 = new Action_bt_node_test_htn_travel_travel_by_air_node7();
								node7.SetClassNameString("Action");
								node7.SetId(7);
#if !BEHAVIAC_RELEASE
								node7.SetAgentType("HTNAgentTravel");
#endif
								node6.AddChild(node7);
								node6.SetHasEvents(node6.HasEvents() | node7.HasEvents());
							}
							{
								ReferencedBehavior_bt_node_test_htn_travel_travel_by_air_node4 node4 = new ReferencedBehavior_bt_node_test_htn_travel_travel_by_air_node4();
								node4.SetClassNameString("ReferencedBehavior");
								node4.SetId(4);
#if !BEHAVIAC_RELEASE
								node4.SetAgentType("HTNAgentTravel");
#endif
								node6.AddChild(node4);
								node6.SetHasEvents(node6.HasEvents() | node4.HasEvents());
							}
							node5.SetHasEvents(node5.HasEvents() | node6.HasEvents());
						}
						node1.SetHasEvents(node1.HasEvents() | node5.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
Example #27
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/condition_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);
				{
					Condition_bt_node_test_condition_ut_0_node1 node1 = new Condition_bt_node_test_condition_ut_0_node1();
					node1.SetClassNameString("Condition");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node1);
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Action_bt_node_test_condition_ut_0_node2 node2 = new Action_bt_node_test_condition_ut_0_node2();
					node2.SetClassNameString("Action");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node2);
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Condition_bt_node_test_condition_ut_0_node3 node3 = new Condition_bt_node_test_condition_ut_0_node3();
					node3.SetClassNameString("Condition");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node3);
					node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
				}
				{
					Action_bt_node_test_condition_ut_0_node4 node4 = new Action_bt_node_test_condition_ut_0_node4();
					node4.SetClassNameString("Action");
					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;
		}
        public static bool build_behavior_tree(BehaviorTree bt)
        {
            bt.SetClassNameString("BehaviorTree");
            bt.SetId(-1);
            bt.SetName("test_base");
#if !BEHAVIAC_RELEASE
            bt.SetAgentType("AgentBase");
#endif
            // children
            {
                DecoratorLoop_bt_test_base_node0 node0 = new DecoratorLoop_bt_test_base_node0();
                node0.SetClassNameString("DecoratorLoop");
                node0.SetId(0);
#if !BEHAVIAC_RELEASE
                node0.SetAgentType("AgentBase");
#endif
                bt.AddChild(node0);
                {
                    Parallel_bt_test_base_node1 node1 = new Parallel_bt_test_base_node1();
                    node1.SetClassNameString("Parallel");
                    node1.SetId(1);
#if !BEHAVIAC_RELEASE
                    node1.SetAgentType("AgentBase");
#endif
                    node0.AddChild(node1);
                    {
                        Action_bt_test_base_node2 node2 = new Action_bt_test_base_node2();
                        node2.SetClassNameString("Action");
                        node2.SetId(2);
#if !BEHAVIAC_RELEASE
                        node2.SetAgentType("AgentBase");
#endif
                        node1.AddChild(node2);
                        node1.SetHasEvents(node1.HasEvents() | node2.HasEvents());
                    }
                    {
                        Action_bt_test_base_node3 node3 = new Action_bt_test_base_node3();
                        node3.SetClassNameString("Action");
                        node3.SetId(3);
#if !BEHAVIAC_RELEASE
                        node3.SetAgentType("AgentBase");
#endif
                        node1.AddChild(node3);
                        node1.SetHasEvents(node1.HasEvents() | node3.HasEvents());
                    }
                    {
                        Action_bt_test_base_node4 node4 = new Action_bt_test_base_node4();
                        node4.SetClassNameString("Action");
                        node4.SetId(4);
#if !BEHAVIAC_RELEASE
                        node4.SetAgentType("AgentBase");
#endif
                        node1.AddChild(node4);
                        node1.SetHasEvents(node1.HasEvents() | node4.HasEvents());
                    }
                    node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
                }
                bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
            }
            return(true);
        }
Example #29
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/condition_ut_3");
			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);
				{
					And node9 = new And();
					node9.SetClassNameString("And");
					node9.SetId(9);
#if !BEHAVIAC_RELEASE
					node9.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node9);
					{
						Or node13 = new Or();
						node13.SetClassNameString("Or");
						node13.SetId(13);
#if !BEHAVIAC_RELEASE
						node13.SetAgentType("AgentNodeTest");
#endif
						node9.AddChild(node13);
						{
							True node10 = new True();
							node10.SetClassNameString("True");
							node10.SetId(10);
#if !BEHAVIAC_RELEASE
							node10.SetAgentType("AgentNodeTest");
#endif
							node13.AddChild(node10);
							node13.SetHasEvents(node13.HasEvents() | node10.HasEvents());
						}
						{
							False node14 = new False();
							node14.SetClassNameString("False");
							node14.SetId(14);
#if !BEHAVIAC_RELEASE
							node14.SetAgentType("AgentNodeTest");
#endif
							node13.AddChild(node14);
							node13.SetHasEvents(node13.HasEvents() | node14.HasEvents());
						}
						node9.SetHasEvents(node9.HasEvents() | node13.HasEvents());
					}
					{
						True node11 = new True();
						node11.SetClassNameString("True");
						node11.SetId(11);
#if !BEHAVIAC_RELEASE
						node11.SetAgentType("AgentNodeTest");
#endif
						node9.AddChild(node11);
						node9.SetHasEvents(node9.HasEvents() | node11.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node9.HasEvents());
				}
				{
					Action_bt_node_test_condition_ut_3_node2 node2 = new Action_bt_node_test_condition_ut_3_node2();
					node2.SetClassNameString("Action");
					node2.SetId(2);
#if !BEHAVIAC_RELEASE
					node2.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node2);
					node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
				}
				{
					Or node1 = new Or();
					node1.SetClassNameString("Or");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node1);
					{
						And node15 = new And();
						node15.SetClassNameString("And");
						node15.SetId(15);
#if !BEHAVIAC_RELEASE
						node15.SetAgentType("AgentNodeTest");
#endif
						node1.AddChild(node15);
						{
							True node3 = new True();
							node3.SetClassNameString("True");
							node3.SetId(3);
#if !BEHAVIAC_RELEASE
							node3.SetAgentType("AgentNodeTest");
#endif
							node15.AddChild(node3);
							node15.SetHasEvents(node15.HasEvents() | node3.HasEvents());
						}
						{
							True node16 = new True();
							node16.SetClassNameString("True");
							node16.SetId(16);
#if !BEHAVIAC_RELEASE
							node16.SetAgentType("AgentNodeTest");
#endif
							node15.AddChild(node16);
							node15.SetHasEvents(node15.HasEvents() | node16.HasEvents());
						}
						node1.SetHasEvents(node1.HasEvents() | node15.HasEvents());
					}
					{
						False node5 = new False();
						node5.SetClassNameString("False");
						node5.SetId(5);
#if !BEHAVIAC_RELEASE
						node5.SetAgentType("AgentNodeTest");
#endif
						node1.AddChild(node5);
						node1.SetHasEvents(node1.HasEvents() | node5.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
				}
				{
					Action_bt_node_test_condition_ut_3_node8 node8 = new Action_bt_node_test_condition_ut_3_node8();
					node8.SetClassNameString("Action");
					node8.SetId(8);
#if !BEHAVIAC_RELEASE
					node8.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node8);
					node0.SetHasEvents(node0.HasEvents() | node8.HasEvents());
				}
				{
					And node4 = new And();
					node4.SetClassNameString("And");
					node4.SetId(4);
#if !BEHAVIAC_RELEASE
					node4.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node4);
					{
						Or node18 = new Or();
						node18.SetClassNameString("Or");
						node18.SetId(18);
#if !BEHAVIAC_RELEASE
						node18.SetAgentType("AgentNodeTest");
#endif
						node4.AddChild(node18);
						{
							Or node19 = new Or();
							node19.SetClassNameString("Or");
							node19.SetId(19);
#if !BEHAVIAC_RELEASE
							node19.SetAgentType("AgentNodeTest");
#endif
							node18.AddChild(node19);
							{
								False node6 = new False();
								node6.SetClassNameString("False");
								node6.SetId(6);
#if !BEHAVIAC_RELEASE
								node6.SetAgentType("AgentNodeTest");
#endif
								node19.AddChild(node6);
								node19.SetHasEvents(node19.HasEvents() | node6.HasEvents());
							}
							{
								True node21 = new True();
								node21.SetClassNameString("True");
								node21.SetId(21);
#if !BEHAVIAC_RELEASE
								node21.SetAgentType("AgentNodeTest");
#endif
								node19.AddChild(node21);
								node19.SetHasEvents(node19.HasEvents() | node21.HasEvents());
							}
							node18.SetHasEvents(node18.HasEvents() | node19.HasEvents());
						}
						{
							False node22 = new False();
							node22.SetClassNameString("False");
							node22.SetId(22);
#if !BEHAVIAC_RELEASE
							node22.SetAgentType("AgentNodeTest");
#endif
							node18.AddChild(node22);
							node18.SetHasEvents(node18.HasEvents() | node22.HasEvents());
						}
						node4.SetHasEvents(node4.HasEvents() | node18.HasEvents());
					}
					{
						And node17 = new And();
						node17.SetClassNameString("And");
						node17.SetId(17);
#if !BEHAVIAC_RELEASE
						node17.SetAgentType("AgentNodeTest");
#endif
						node4.AddChild(node17);
						{
							True node7 = new True();
							node7.SetClassNameString("True");
							node7.SetId(7);
#if !BEHAVIAC_RELEASE
							node7.SetAgentType("AgentNodeTest");
#endif
							node17.AddChild(node7);
							node17.SetHasEvents(node17.HasEvents() | node7.HasEvents());
						}
						{
							And node20 = new And();
							node20.SetClassNameString("And");
							node20.SetId(20);
#if !BEHAVIAC_RELEASE
							node20.SetAgentType("AgentNodeTest");
#endif
							node17.AddChild(node20);
							{
								True node23 = new True();
								node23.SetClassNameString("True");
								node23.SetId(23);
#if !BEHAVIAC_RELEASE
								node23.SetAgentType("AgentNodeTest");
#endif
								node20.AddChild(node23);
								node20.SetHasEvents(node20.HasEvents() | node23.HasEvents());
							}
							{
								True node24 = new True();
								node24.SetClassNameString("True");
								node24.SetId(24);
#if !BEHAVIAC_RELEASE
								node24.SetAgentType("AgentNodeTest");
#endif
								node20.AddChild(node24);
								node20.SetHasEvents(node20.HasEvents() | node24.HasEvents());
							}
							node17.SetHasEvents(node17.HasEvents() | node20.HasEvents());
						}
						node4.SetHasEvents(node4.HasEvents() | node17.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
				}
				{
					Action_bt_node_test_condition_ut_3_node12 node12 = new Action_bt_node_test_condition_ut_3_node12();
					node12.SetClassNameString("Action");
					node12.SetId(12);
#if !BEHAVIAC_RELEASE
					node12.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node12);
					node0.SetHasEvents(node0.HasEvents() | node12.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
Example #30
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/PreconditionEffectorTest/PreconditionEffectorTest_1");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("PreconEffectorAgent");
#endif
			// children
			{
				Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_node4 node4 = new Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_node4();
				node4.SetClassNameString("Action");
				node4.SetId(4);
#if !BEHAVIAC_RELEASE
				node4.SetAgentType("PreconEffectorAgent");
#endif
				// attachments
				{
					Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach0 attach0 = new Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach0();
					attach0.SetClassNameString("Precondition");
					attach0.SetId(0);
#if !BEHAVIAC_RELEASE
					attach0.SetAgentType("PreconEffectorAgent");
#endif
					node4.Attach(attach0, true, false, false);
				}
				{
					Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach1 attach1 = new Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach1();
					attach1.SetClassNameString("Precondition");
					attach1.SetId(1);
#if !BEHAVIAC_RELEASE
					attach1.SetAgentType("PreconEffectorAgent");
#endif
					node4.Attach(attach1, true, false, false);
				}
				{
					Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach2 attach2 = new Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach2();
					attach2.SetClassNameString("Precondition");
					attach2.SetId(2);
#if !BEHAVIAC_RELEASE
					attach2.SetAgentType("PreconEffectorAgent");
#endif
					node4.Attach(attach2, true, false, false);
				}
				{
					Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach3 attach3 = new Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach3();
					attach3.SetClassNameString("Precondition");
					attach3.SetId(3);
#if !BEHAVIAC_RELEASE
					attach3.SetAgentType("PreconEffectorAgent");
#endif
					node4.Attach(attach3, true, false, false);
				}
				{
					Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach5 attach5 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach5();
					attach5.SetClassNameString("Effector");
					attach5.SetId(5);
#if !BEHAVIAC_RELEASE
					attach5.SetAgentType("PreconEffectorAgent");
#endif
					node4.Attach(attach5, false, true, false);
				}
				{
					Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach6 attach6 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach6();
					attach6.SetClassNameString("Effector");
					attach6.SetId(6);
#if !BEHAVIAC_RELEASE
					attach6.SetAgentType("PreconEffectorAgent");
#endif
					node4.Attach(attach6, false, true, false);
				}
				{
					Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach7 attach7 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_1_attach7();
					attach7.SetClassNameString("Effector");
					attach7.SetId(7);
#if !BEHAVIAC_RELEASE
					attach7.SetAgentType("PreconEffectorAgent");
#endif
					node4.Attach(attach7, false, true, false);
				}
				bt.AddChild(node4);
				bt.SetHasEvents(bt.HasEvents() | node4.HasEvents());
			}
			return true;
		}
Example #31
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;
		}
Example #32
0
		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/fsm/fsm_ref_bt_ut");
			bt.IsFSM = true;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// attachments
			// children
			{
				FSM fsm = new FSM();
				fsm.SetClassNameString("FSM");
				fsm.SetId(-1);
				fsm.InitialId = 1;
#if !BEHAVIAC_RELEASE
				fsm.SetAgentType("AgentNodeTest");
#endif
				{
					State_bt_node_test_fsm_fsm_ref_bt_ut_node1 node1 = new State_bt_node_test_fsm_fsm_ref_bt_ut_node1();
					node1.SetClassNameString("State");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					// attachments
					{
						Transition_bt_node_test_fsm_fsm_ref_bt_ut_attach4 attach4 = new Transition_bt_node_test_fsm_fsm_ref_bt_ut_attach4();
						attach4.SetClassNameString("Transition");
						attach4.SetId(4);
#if !BEHAVIAC_RELEASE
						attach4.SetAgentType("AgentNodeTest");
#endif
						node1.Attach(attach4, false, false, true);
					}
					fsm.AddChild(node1);
					fsm.SetHasEvents(fsm.HasEvents() | node1.HasEvents());
				}
				{
					State_bt_node_test_fsm_fsm_ref_bt_ut_node3 node3 = new State_bt_node_test_fsm_fsm_ref_bt_ut_node3();
					node3.SetClassNameString("State");
					node3.SetId(3);
#if !BEHAVIAC_RELEASE
					node3.SetAgentType("AgentNodeTest");
#endif
					// attachments
					{
						Precondition_bt_node_test_fsm_fsm_ref_bt_ut_attach2 attach2 = new Precondition_bt_node_test_fsm_fsm_ref_bt_ut_attach2();
						attach2.SetClassNameString("Precondition");
						attach2.SetId(2);
#if !BEHAVIAC_RELEASE
						attach2.SetAgentType("AgentNodeTest");
#endif
						node3.Attach(attach2, true, false, false);
					}
					fsm.AddChild(node3);
					fsm.SetHasEvents(fsm.HasEvents() | node3.HasEvents());
				}
				{
					ReferencedBehavior_bt_node_test_fsm_fsm_ref_bt_ut_node6 node6 = new ReferencedBehavior_bt_node_test_fsm_fsm_ref_bt_ut_node6();
					node6.SetClassNameString("ReferencedBehavior");
					node6.SetId(6);
#if !BEHAVIAC_RELEASE
					node6.SetAgentType("AgentNodeTest");
#endif
					// attachments
					{
						Precondition_bt_node_test_fsm_fsm_ref_bt_ut_attach5 attach5 = new Precondition_bt_node_test_fsm_fsm_ref_bt_ut_attach5();
						attach5.SetClassNameString("Precondition");
						attach5.SetId(5);
#if !BEHAVIAC_RELEASE
						attach5.SetAgentType("AgentNodeTest");
#endif
						node6.Attach(attach5, true, false, false);
					}
					{
						Transition_bt_node_test_fsm_fsm_ref_bt_ut_attach9 attach9 = new Transition_bt_node_test_fsm_fsm_ref_bt_ut_attach9();
						attach9.SetClassNameString("Transition");
						attach9.SetId(9);
#if !BEHAVIAC_RELEASE
						attach9.SetAgentType("AgentNodeTest");
#endif
						node6.Attach(attach9, false, false, true);
					}
					fsm.AddChild(node6);
					fsm.SetHasEvents(fsm.HasEvents() | node6.HasEvents());
				}
				bt.AddChild(fsm);
			}
			return true;
		}
Example #33
0
        public static bool build_behavior_tree(BehaviorTree bt)
        {
            bt.SetClassNameString("BehaviorTree");
            bt.SetId(-1);
            bt.SetName("WrapperAI/Soldier/BTSoldierSiege");
            bt.AddPar("Assets.Scripts.GameLogic.SkillSlotType", "p_curSlotType", "SLOT_SKILL_0", string.Empty);
            bt.AddPar("uint", "p_targetID", "0", string.Empty);
            bt.AddPar("int", "p_srchRange", "0", string.Empty);
            bt.AddPar("UnityEngine.Vector3", "p_AttackMoveDest", "{kEpsilon=0;x=0;y=0;z=0;}", string.Empty);
            bt.AddPar("bool", "p_IsAttackMove_Attack", "false", string.Empty);
            bt.AddPar("bool", "p_AttackIsFinished", "true", string.Empty);
            bt.AddPar("uint", "p_CmdID", "0", string.Empty);
            bt.AddPar("UnityEngine.Vector3", "p_attackPathCurTargetPos", "{kEpsilon=0;x=0;y=0;z=0;}", string.Empty);
            Sequence pChild = new Sequence();

            pChild.SetClassNameString("Sequence");
            pChild.SetId(0);
            bt.AddChild(pChild);
            Assignment_bt_WrapperAI_Soldier_BTSoldierSiege_node106 _node = new Assignment_bt_WrapperAI_Soldier_BTSoldierSiege_node106();

            _node.SetClassNameString("Assignment");
            _node.SetId(0x6a);
            pChild.AddChild(_node);
            pChild.SetHasEvents(pChild.HasEvents() | _node.HasEvents());
            DecoratorLoop_bt_WrapperAI_Soldier_BTSoldierSiege_node14 _node2 = new DecoratorLoop_bt_WrapperAI_Soldier_BTSoldierSiege_node14();

            _node2.SetClassNameString("DecoratorLoop");
            _node2.SetId(14);
            pChild.AddChild(_node2);
            SelectorLoop loop = new SelectorLoop();

            loop.SetClassNameString("SelectorLoop");
            loop.SetId(1);
            _node2.AddChild(loop);
            WithPrecondition precondition = new WithPrecondition();

            precondition.SetClassNameString("WithPrecondition");
            precondition.SetId(0x3b);
            loop.AddChild(precondition);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node78 _node3 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node78();

            _node3.SetClassNameString("Condition");
            _node3.SetId(0x4e);
            precondition.AddChild(_node3);
            precondition.SetHasEvents(precondition.HasEvents() | _node3.HasEvents());
            Sequence sequence2 = new Sequence();

            sequence2.SetClassNameString("Sequence");
            sequence2.SetId(0x69);
            precondition.AddChild(sequence2);
            Assignment_bt_WrapperAI_Soldier_BTSoldierSiege_node107 _node4 = new Assignment_bt_WrapperAI_Soldier_BTSoldierSiege_node107();

            _node4.SetClassNameString("Assignment");
            _node4.SetId(0x6b);
            sequence2.AddChild(_node4);
            sequence2.SetHasEvents(sequence2.HasEvents() | _node4.HasEvents());
            IfElse @else = new IfElse();

            @else.SetClassNameString("IfElse");
            @else.SetId(0x6c);
            sequence2.AddChild(@else);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node109 _node5 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node109();

            _node5.SetClassNameString("Condition");
            _node5.SetId(0x6d);
            @else.AddChild(_node5);
            @else.SetHasEvents(@else.HasEvents() | _node5.HasEvents());
            Sequence sequence3 = new Sequence();

            sequence3.SetClassNameString("Sequence");
            sequence3.SetId(110);
            @else.AddChild(sequence3);
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node111 _node6 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node111();

            _node6.SetClassNameString("Action");
            _node6.SetId(0x6f);
            sequence3.AddChild(_node6);
            sequence3.SetHasEvents(sequence3.HasEvents() | _node6.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node112 _node7 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node112();

            _node7.SetClassNameString("Action");
            _node7.SetId(0x70);
            sequence3.AddChild(_node7);
            sequence3.SetHasEvents(sequence3.HasEvents() | _node7.HasEvents());
            IfElse else2 = new IfElse();

            else2.SetClassNameString("IfElse");
            else2.SetId(5);
            sequence3.AddChild(else2);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node6 _node8 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node6();

            _node8.SetClassNameString("Condition");
            _node8.SetId(6);
            else2.AddChild(_node8);
            else2.SetHasEvents(else2.HasEvents() | _node8.HasEvents());
            Sequence sequence4 = new Sequence();

            sequence4.SetClassNameString("Sequence");
            sequence4.SetId(7);
            else2.AddChild(sequence4);
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node23 _node9 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node23();

            _node9.SetClassNameString("Action");
            _node9.SetId(0x17);
            sequence4.AddChild(_node9);
            sequence4.SetHasEvents(sequence4.HasEvents() | _node9.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node113 _node10 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node113();

            _node10.SetClassNameString("Action");
            _node10.SetId(0x71);
            sequence4.AddChild(_node10);
            sequence4.SetHasEvents(sequence4.HasEvents() | _node10.HasEvents());
            Selector selector = new Selector();

            selector.SetClassNameString("Selector");
            selector.SetId(0x11);
            sequence4.AddChild(selector);
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node114 _node11 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node114();

            _node11.SetClassNameString("Action");
            _node11.SetId(0x72);
            selector.AddChild(_node11);
            selector.SetHasEvents(selector.HasEvents() | _node11.HasEvents());
            DecoratorAlwaysFailure_bt_WrapperAI_Soldier_BTSoldierSiege_node19 _node12 = new DecoratorAlwaysFailure_bt_WrapperAI_Soldier_BTSoldierSiege_node19();

            _node12.SetClassNameString("DecoratorAlwaysFailure");
            _node12.SetId(0x13);
            selector.AddChild(_node12);
            Assignment_bt_WrapperAI_Soldier_BTSoldierSiege_node18 _node13 = new Assignment_bt_WrapperAI_Soldier_BTSoldierSiege_node18();

            _node13.SetClassNameString("Assignment");
            _node13.SetId(0x12);
            _node12.AddChild(_node13);
            _node12.SetHasEvents(_node12.HasEvents() | _node13.HasEvents());
            selector.SetHasEvents(selector.HasEvents() | _node12.HasEvents());
            sequence4.SetHasEvents(sequence4.HasEvents() | selector.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node140 _node14 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node140();

            _node14.SetClassNameString("Action");
            _node14.SetId(140);
            sequence4.AddChild(_node14);
            sequence4.SetHasEvents(sequence4.HasEvents() | _node14.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node116 _node15 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node116();

            _node15.SetClassNameString("Action");
            _node15.SetId(0x74);
            sequence4.AddChild(_node15);
            sequence4.SetHasEvents(sequence4.HasEvents() | _node15.HasEvents());
            DecoratorLoopUntil_bt_WrapperAI_Soldier_BTSoldierSiege_node117 _node16 = new DecoratorLoopUntil_bt_WrapperAI_Soldier_BTSoldierSiege_node117();

            _node16.SetClassNameString("DecoratorLoopUntil");
            _node16.SetId(0x75);
            sequence4.AddChild(_node16);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node118 _node17 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node118();

            _node17.SetClassNameString("Condition");
            _node17.SetId(0x76);
            _node16.AddChild(_node17);
            _node16.SetHasEvents(_node16.HasEvents() | _node17.HasEvents());
            sequence4.SetHasEvents(sequence4.HasEvents() | _node16.HasEvents());
            else2.SetHasEvents(else2.HasEvents() | sequence4.HasEvents());
            Sequence sequence5 = new Sequence();

            sequence5.SetClassNameString("Sequence");
            sequence5.SetId(9);
            else2.AddChild(sequence5);
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node4 _node18 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node4();

            _node18.SetClassNameString("Action");
            _node18.SetId(4);
            sequence5.AddChild(_node18);
            sequence5.SetHasEvents(sequence5.HasEvents() | _node18.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node13 _node19 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node13();

            _node19.SetClassNameString("Action");
            _node19.SetId(13);
            sequence5.AddChild(_node19);
            sequence5.SetHasEvents(sequence5.HasEvents() | _node19.HasEvents());
            DecoratorLoopUntil_bt_WrapperAI_Soldier_BTSoldierSiege_node15 _node20 = new DecoratorLoopUntil_bt_WrapperAI_Soldier_BTSoldierSiege_node15();

            _node20.SetClassNameString("DecoratorLoopUntil");
            _node20.SetId(15);
            sequence5.AddChild(_node20);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node16 _node21 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node16();

            _node21.SetClassNameString("Condition");
            _node21.SetId(0x10);
            _node20.AddChild(_node21);
            _node20.SetHasEvents(_node20.HasEvents() | _node21.HasEvents());
            sequence5.SetHasEvents(sequence5.HasEvents() | _node20.HasEvents());
            else2.SetHasEvents(else2.HasEvents() | sequence5.HasEvents());
            sequence3.SetHasEvents(sequence3.HasEvents() | else2.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node28 _node22 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node28();

            _node22.SetClassNameString("Action");
            _node22.SetId(0x1c);
            sequence3.AddChild(_node22);
            sequence3.SetHasEvents(sequence3.HasEvents() | _node22.HasEvents());
            @else.SetHasEvents(@else.HasEvents() | sequence3.HasEvents());
            Sequence sequence6 = new Sequence();

            sequence6.SetClassNameString("Sequence");
            sequence6.SetId(0x80);
            @else.AddChild(sequence6);
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node129 _node23 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node129();

            _node23.SetClassNameString("Action");
            _node23.SetId(0x81);
            sequence6.AddChild(_node23);
            sequence6.SetHasEvents(sequence6.HasEvents() | _node23.HasEvents());
            IfElse else3 = new IfElse();

            else3.SetClassNameString("IfElse");
            else3.SetId(0x77);
            sequence6.AddChild(else3);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node120 _node24 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node120();

            _node24.SetClassNameString("Condition");
            _node24.SetId(120);
            else3.AddChild(_node24);
            else3.SetHasEvents(else3.HasEvents() | _node24.HasEvents());
            Sequence sequence7 = new Sequence();

            sequence7.SetClassNameString("Sequence");
            sequence7.SetId(0x79);
            else3.AddChild(sequence7);
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node24 _node25 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node24();

            _node25.SetClassNameString("Action");
            _node25.SetId(0x18);
            sequence7.AddChild(_node25);
            sequence7.SetHasEvents(sequence7.HasEvents() | _node25.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node444 _node26 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node444();

            _node26.SetClassNameString("Action");
            _node26.SetId(0x1bc);
            sequence7.AddChild(_node26);
            sequence7.SetHasEvents(sequence7.HasEvents() | _node26.HasEvents());
            Assignment_bt_WrapperAI_Soldier_BTSoldierSiege_node122 _node27 = new Assignment_bt_WrapperAI_Soldier_BTSoldierSiege_node122();

            _node27.SetClassNameString("Assignment");
            _node27.SetId(0x7a);
            sequence7.AddChild(_node27);
            sequence7.SetHasEvents(sequence7.HasEvents() | _node27.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node123 _node28 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node123();

            _node28.SetClassNameString("Action");
            _node28.SetId(0x7b);
            sequence7.AddChild(_node28);
            sequence7.SetHasEvents(sequence7.HasEvents() | _node28.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node124 _node29 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node124();

            _node29.SetClassNameString("Action");
            _node29.SetId(0x7c);
            sequence7.AddChild(_node29);
            sequence7.SetHasEvents(sequence7.HasEvents() | _node29.HasEvents());
            else3.SetHasEvents(else3.HasEvents() | sequence7.HasEvents());
            Sequence sequence8 = new Sequence();

            sequence8.SetClassNameString("Sequence");
            sequence8.SetId(0x7d);
            else3.AddChild(sequence8);
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node126 _node30 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node126();

            _node30.SetClassNameString("Action");
            _node30.SetId(0x7e);
            sequence8.AddChild(_node30);
            sequence8.SetHasEvents(sequence8.HasEvents() | _node30.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node127 _node31 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node127();

            _node31.SetClassNameString("Action");
            _node31.SetId(0x7f);
            sequence8.AddChild(_node31);
            sequence8.SetHasEvents(sequence8.HasEvents() | _node31.HasEvents());
            else3.SetHasEvents(else3.HasEvents() | sequence8.HasEvents());
            sequence6.SetHasEvents(sequence6.HasEvents() | else3.HasEvents());
            @else.SetHasEvents(@else.HasEvents() | sequence6.HasEvents());
            sequence2.SetHasEvents(sequence2.HasEvents() | @else.HasEvents());
            precondition.SetHasEvents(precondition.HasEvents() | sequence2.HasEvents());
            loop.SetHasEvents(loop.HasEvents() | precondition.HasEvents());
            WithPrecondition precondition2 = new WithPrecondition();

            precondition2.SetClassNameString("WithPrecondition");
            precondition2.SetId(0x203);
            loop.AddChild(precondition2);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node516 _node32 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node516();

            _node32.SetClassNameString("Condition");
            _node32.SetId(0x204);
            precondition2.AddChild(_node32);
            precondition2.SetHasEvents(precondition2.HasEvents() | _node32.HasEvents());
            Selector selector2 = new Selector();

            selector2.SetClassNameString("Selector");
            selector2.SetId(2);
            precondition2.AddChild(selector2);
            Sequence sequence9 = new Sequence();

            sequence9.SetClassNameString("Sequence");
            sequence9.SetId(3);
            selector2.AddChild(sequence9);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node10 _node33 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node10();

            _node33.SetClassNameString("Condition");
            _node33.SetId(10);
            sequence9.AddChild(_node33);
            sequence9.SetHasEvents(sequence9.HasEvents() | _node33.HasEvents());
            Assignment_bt_WrapperAI_Soldier_BTSoldierSiege_node11 _node34 = new Assignment_bt_WrapperAI_Soldier_BTSoldierSiege_node11();

            _node34.SetClassNameString("Assignment");
            _node34.SetId(11);
            sequence9.AddChild(_node34);
            sequence9.SetHasEvents(sequence9.HasEvents() | _node34.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node12 _node35 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node12();

            _node35.SetClassNameString("Action");
            _node35.SetId(12);
            sequence9.AddChild(_node35);
            sequence9.SetHasEvents(sequence9.HasEvents() | _node35.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node8 _node36 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node8();

            _node36.SetClassNameString("Action");
            _node36.SetId(8);
            sequence9.AddChild(_node36);
            sequence9.SetHasEvents(sequence9.HasEvents() | _node36.HasEvents());
            selector2.SetHasEvents(selector2.HasEvents() | sequence9.HasEvents());
            Sequence sequence10 = new Sequence();

            sequence10.SetClassNameString("Sequence");
            sequence10.SetId(0x205);
            selector2.AddChild(sequence10);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node20 _node37 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node20();

            _node37.SetClassNameString("Condition");
            _node37.SetId(20);
            sequence10.AddChild(_node37);
            sequence10.SetHasEvents(sequence10.HasEvents() | _node37.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node518 _node38 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node518();

            _node38.SetClassNameString("Action");
            _node38.SetId(0x206);
            sequence10.AddChild(_node38);
            sequence10.SetHasEvents(sequence10.HasEvents() | _node38.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node519 _node39 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node519();

            _node39.SetClassNameString("Action");
            _node39.SetId(0x207);
            sequence10.AddChild(_node39);
            sequence10.SetHasEvents(sequence10.HasEvents() | _node39.HasEvents());
            IfElse else4 = new IfElse();

            else4.SetClassNameString("IfElse");
            else4.SetId(520);
            sequence10.AddChild(else4);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node521 _node40 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node521();

            _node40.SetClassNameString("Condition");
            _node40.SetId(0x209);
            else4.AddChild(_node40);
            else4.SetHasEvents(else4.HasEvents() | _node40.HasEvents());
            Sequence sequence11 = new Sequence();

            sequence11.SetClassNameString("Sequence");
            sequence11.SetId(0x20a);
            else4.AddChild(sequence11);
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node523 _node41 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node523();

            _node41.SetClassNameString("Action");
            _node41.SetId(0x20b);
            sequence11.AddChild(_node41);
            sequence11.SetHasEvents(sequence11.HasEvents() | _node41.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node524 _node42 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node524();

            _node42.SetClassNameString("Action");
            _node42.SetId(0x20c);
            sequence11.AddChild(_node42);
            sequence11.SetHasEvents(sequence11.HasEvents() | _node42.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node526 _node43 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node526();

            _node43.SetClassNameString("Action");
            _node43.SetId(0x20e);
            sequence11.AddChild(_node43);
            sequence11.SetHasEvents(sequence11.HasEvents() | _node43.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node25 _node44 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node25();

            _node44.SetClassNameString("Action");
            _node44.SetId(0x19);
            sequence11.AddChild(_node44);
            sequence11.SetHasEvents(sequence11.HasEvents() | _node44.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node530 _node45 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node530();

            _node45.SetClassNameString("Action");
            _node45.SetId(530);
            sequence11.AddChild(_node45);
            sequence11.SetHasEvents(sequence11.HasEvents() | _node45.HasEvents());
            DecoratorLoopUntil_bt_WrapperAI_Soldier_BTSoldierSiege_node531 _node46 = new DecoratorLoopUntil_bt_WrapperAI_Soldier_BTSoldierSiege_node531();

            _node46.SetClassNameString("DecoratorLoopUntil");
            _node46.SetId(0x213);
            sequence11.AddChild(_node46);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node532 _node47 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node532();

            _node47.SetClassNameString("Condition");
            _node47.SetId(0x214);
            _node46.AddChild(_node47);
            _node46.SetHasEvents(_node46.HasEvents() | _node47.HasEvents());
            sequence11.SetHasEvents(sequence11.HasEvents() | _node46.HasEvents());
            else4.SetHasEvents(else4.HasEvents() | sequence11.HasEvents());
            Sequence sequence12 = new Sequence();

            sequence12.SetClassNameString("Sequence");
            sequence12.SetId(0x215);
            else4.AddChild(sequence12);
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node26 _node48 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node26();

            _node48.SetClassNameString("Action");
            _node48.SetId(0x1a);
            sequence12.AddChild(_node48);
            sequence12.SetHasEvents(sequence12.HasEvents() | _node48.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node535 _node49 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node535();

            _node49.SetClassNameString("Action");
            _node49.SetId(0x217);
            sequence12.AddChild(_node49);
            sequence12.SetHasEvents(sequence12.HasEvents() | _node49.HasEvents());
            DecoratorLoopUntil_bt_WrapperAI_Soldier_BTSoldierSiege_node536 _node50 = new DecoratorLoopUntil_bt_WrapperAI_Soldier_BTSoldierSiege_node536();

            _node50.SetClassNameString("DecoratorLoopUntil");
            _node50.SetId(0x218);
            sequence12.AddChild(_node50);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node537 _node51 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node537();

            _node51.SetClassNameString("Condition");
            _node51.SetId(0x219);
            _node50.AddChild(_node51);
            _node50.SetHasEvents(_node50.HasEvents() | _node51.HasEvents());
            sequence12.SetHasEvents(sequence12.HasEvents() | _node50.HasEvents());
            else4.SetHasEvents(else4.HasEvents() | sequence12.HasEvents());
            sequence10.SetHasEvents(sequence10.HasEvents() | else4.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node538 _node52 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node538();

            _node52.SetClassNameString("Action");
            _node52.SetId(0x21a);
            sequence10.AddChild(_node52);
            sequence10.SetHasEvents(sequence10.HasEvents() | _node52.HasEvents());
            selector2.SetHasEvents(selector2.HasEvents() | sequence10.HasEvents());
            precondition2.SetHasEvents(precondition2.HasEvents() | selector2.HasEvents());
            loop.SetHasEvents(loop.HasEvents() | precondition2.HasEvents());
            WithPrecondition precondition3 = new WithPrecondition();

            precondition3.SetClassNameString("WithPrecondition");
            precondition3.SetId(0x15);
            loop.AddChild(precondition3);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node22 _node53 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node22();

            _node53.SetClassNameString("Condition");
            _node53.SetId(0x16);
            precondition3.AddChild(_node53);
            precondition3.SetHasEvents(precondition3.HasEvents() | _node53.HasEvents());
            Sequence sequence13 = new Sequence();

            sequence13.SetClassNameString("Sequence");
            sequence13.SetId(0x1b);
            precondition3.AddChild(sequence13);
            Selector selector3 = new Selector();

            selector3.SetClassNameString("Selector");
            selector3.SetId(0x1e7);
            sequence13.AddChild(selector3);
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node488 _node54 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node488();

            _node54.SetClassNameString("Action");
            _node54.SetId(0x1e8);
            selector3.AddChild(_node54);
            selector3.SetHasEvents(selector3.HasEvents() | _node54.HasEvents());
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node35 _node55 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node35();

            _node55.SetClassNameString("Action");
            _node55.SetId(0x23);
            selector3.AddChild(_node55);
            selector3.SetHasEvents(selector3.HasEvents() | _node55.HasEvents());
            sequence13.SetHasEvents(sequence13.HasEvents() | selector3.HasEvents());
            DecoratorLoop_bt_WrapperAI_Soldier_BTSoldierSiege_node65 _node56 = new DecoratorLoop_bt_WrapperAI_Soldier_BTSoldierSiege_node65();

            _node56.SetClassNameString("DecoratorLoop");
            _node56.SetId(0x41);
            sequence13.AddChild(_node56);
            Noop noop = new Noop();

            noop.SetClassNameString("Noop");
            noop.SetId(0x42);
            _node56.AddChild(noop);
            _node56.SetHasEvents(_node56.HasEvents() | noop.HasEvents());
            sequence13.SetHasEvents(sequence13.HasEvents() | _node56.HasEvents());
            precondition3.SetHasEvents(precondition3.HasEvents() | sequence13.HasEvents());
            loop.SetHasEvents(loop.HasEvents() | precondition3.HasEvents());
            WithPrecondition precondition4 = new WithPrecondition();

            precondition4.SetClassNameString("WithPrecondition");
            precondition4.SetId(450);
            loop.AddChild(precondition4);
            Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node454 _node57 = new Condition_bt_WrapperAI_Soldier_BTSoldierSiege_node454();

            _node57.SetClassNameString("Condition");
            _node57.SetId(0x1c6);
            precondition4.AddChild(_node57);
            precondition4.SetHasEvents(precondition4.HasEvents() | _node57.HasEvents());
            Sequence sequence14 = new Sequence();

            sequence14.SetClassNameString("Sequence");
            sequence14.SetId(0x1c7);
            precondition4.AddChild(sequence14);
            Action_bt_WrapperAI_Soldier_BTSoldierSiege_node456 _node58 = new Action_bt_WrapperAI_Soldier_BTSoldierSiege_node456();

            _node58.SetClassNameString("Action");
            _node58.SetId(0x1c8);
            sequence14.AddChild(_node58);
            sequence14.SetHasEvents(sequence14.HasEvents() | _node58.HasEvents());
            DecoratorLoop_bt_WrapperAI_Soldier_BTSoldierSiege_node457 _node59 = new DecoratorLoop_bt_WrapperAI_Soldier_BTSoldierSiege_node457();

            _node59.SetClassNameString("DecoratorLoop");
            _node59.SetId(0x1c9);
            sequence14.AddChild(_node59);
            Noop noop2 = new Noop();

            noop2.SetClassNameString("Noop");
            noop2.SetId(0x1ca);
            _node59.AddChild(noop2);
            _node59.SetHasEvents(_node59.HasEvents() | noop2.HasEvents());
            sequence14.SetHasEvents(sequence14.HasEvents() | _node59.HasEvents());
            precondition4.SetHasEvents(precondition4.HasEvents() | sequence14.HasEvents());
            loop.SetHasEvents(loop.HasEvents() | precondition4.HasEvents());
            _node2.SetHasEvents(_node2.HasEvents() | loop.HasEvents());
            pChild.SetHasEvents(pChild.HasEvents() | _node2.HasEvents());
            bt.SetHasEvents(bt.HasEvents() | pChild.HasEvents());
            return(true);
        }
Example #34
-1
 public static bool build_behavior_tree(BehaviorTree bt)
 {
     bt.SetClassNameString("BehaviorTree");
     bt.SetId(-1);
     bt.SetName("node_test/action_child_agent_0");
     bt.IsFSM = false;
     #if !BEHAVIAC_RELEASE
     bt.SetAgentType("AgentNodeTest");
     #endif
     // pars
     bt.AddPar("AgentNodeTest", "AgentNodeTest", "par_child_agent", "null");
     // children
     {
         Sequence node0 = new Sequence();
         node0.SetClassNameString("Sequence");
         node0.SetId(0);
     #if !BEHAVIAC_RELEASE
         node0.SetAgentType("AgentNodeTest");
     #endif
         bt.AddChild(node0);
         {
             Action_bt_node_test_action_child_agent_0_node3 node3 = new Action_bt_node_test_action_child_agent_0_node3();
             node3.SetClassNameString("Action");
             node3.SetId(3);
     #if !BEHAVIAC_RELEASE
             node3.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node3);
             node0.SetHasEvents(node0.HasEvents() | node3.HasEvents());
         }
         {
             Assignment_bt_node_test_action_child_agent_0_node2 node2 = new Assignment_bt_node_test_action_child_agent_0_node2();
             node2.SetClassNameString("Assignment");
             node2.SetId(2);
     #if !BEHAVIAC_RELEASE
             node2.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node2);
             node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
         }
         {
             Action_bt_node_test_action_child_agent_0_node1 node1 = new Action_bt_node_test_action_child_agent_0_node1();
             node1.SetClassNameString("Action");
             node1.SetId(1);
     #if !BEHAVIAC_RELEASE
             node1.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node1);
             node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
         }
         bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
     }
     return true;
 }