Пример #1
0
        public static bool build_behavior_tree(BehaviorTree bt)
        {
            bt.SetClassNameString("BehaviorTree");
            bt.SetId(-1);
            bt.SetName("HoverBotBT");
            bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
            bt.SetAgentType("HoverBotAgent");
#endif
            // children
            {
                Selector node0 = new Selector();
                node0.SetClassNameString("Selector");
                node0.SetId(0);
#if !BEHAVIAC_RELEASE
                node0.SetAgentType("HoverBotAgent");
#endif
                bt.AddChild(node0);
                {
                    Sequence node2 = new Sequence();
                    node2.SetClassNameString("Sequence");
                    node2.SetId(2);
#if !BEHAVIAC_RELEASE
                    node2.SetAgentType("HoverBotAgent");
#endif
                    node0.AddChild(node2);
                    {
                        Action_bt_HoverBotBT_node1 node1 = new Action_bt_HoverBotBT_node1();
                        node1.SetClassNameString("Action");
                        node1.SetId(1);
#if !BEHAVIAC_RELEASE
                        node1.SetAgentType("HoverBotAgent");
#endif
                        node2.AddChild(node1);
                        node2.SetHasEvents(node2.HasEvents() | node1.HasEvents());
                    }
                    {
                        Condition_bt_HoverBotBT_node3 node3 = new Condition_bt_HoverBotBT_node3();
                        node3.SetClassNameString("Condition");
                        node3.SetId(3);
#if !BEHAVIAC_RELEASE
                        node3.SetAgentType("HoverBotAgent");
#endif
                        node2.AddChild(node3);
                        node2.SetHasEvents(node2.HasEvents() | node3.HasEvents());
                    }
                    node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
                }
                {
                    Selector node5 = new Selector();
                    node5.SetClassNameString("Selector");
                    node5.SetId(5);
#if !BEHAVIAC_RELEASE
                    node5.SetAgentType("HoverBotAgent");
#endif
                    node0.AddChild(node5);
                    {
                        Sequence node4 = new Sequence();
                        node4.SetClassNameString("Sequence");
                        node4.SetId(4);
#if !BEHAVIAC_RELEASE
                        node4.SetAgentType("HoverBotAgent");
#endif
                        node5.AddChild(node4);
                        {
                            Action_bt_HoverBotBT_node6 node6 = new Action_bt_HoverBotBT_node6();
                            node6.SetClassNameString("Action");
                            node6.SetId(6);
#if !BEHAVIAC_RELEASE
                            node6.SetAgentType("HoverBotAgent");
#endif
                            node4.AddChild(node6);
                            node4.SetHasEvents(node4.HasEvents() | node6.HasEvents());
                        }
                        {
                            Condition_bt_HoverBotBT_node7 node7 = new Condition_bt_HoverBotBT_node7();
                            node7.SetClassNameString("Condition");
                            node7.SetId(7);
#if !BEHAVIAC_RELEASE
                            node7.SetAgentType("HoverBotAgent");
#endif
                            node4.AddChild(node7);
                            node4.SetHasEvents(node4.HasEvents() | node7.HasEvents());
                        }
                        node5.SetHasEvents(node5.HasEvents() | node4.HasEvents());
                    }
                    {
                        Sequence node8 = new Sequence();
                        node8.SetClassNameString("Sequence");
                        node8.SetId(8);
#if !BEHAVIAC_RELEASE
                        node8.SetAgentType("HoverBotAgent");
#endif
                        node5.AddChild(node8);
                        {
                            Action_bt_HoverBotBT_node10 node10 = new Action_bt_HoverBotBT_node10();
                            node10.SetClassNameString("Action");
                            node10.SetId(10);
#if !BEHAVIAC_RELEASE
                            node10.SetAgentType("HoverBotAgent");
#endif
                            node8.AddChild(node10);
                            node8.SetHasEvents(node8.HasEvents() | node10.HasEvents());
                        }
                        node5.SetHasEvents(node5.HasEvents() | node8.HasEvents());
                    }
                    node0.SetHasEvents(node0.HasEvents() | node5.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("HoverBotBT");
            bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
            bt.SetAgentType("HoverBotAgent");
#endif
            // children
            {
                Selector node0 = new Selector();
                node0.SetClassNameString("Selector");
                node0.SetId(0);
#if !BEHAVIAC_RELEASE
                node0.SetAgentType("HoverBotAgent");
#endif
                bt.AddChild(node0);
                {
                    Sequence node2 = new Sequence();
                    node2.SetClassNameString("Sequence");
                    node2.SetId(2);
#if !BEHAVIAC_RELEASE
                    node2.SetAgentType("HoverBotAgent");
#endif
                    node0.AddChild(node2);
                    {
                        Condition_bt_HoverBotBT_node4 node4 = new Condition_bt_HoverBotBT_node4();
                        node4.SetClassNameString("Condition");
                        node4.SetId(4);
#if !BEHAVIAC_RELEASE
                        node4.SetAgentType("HoverBotAgent");
#endif
                        node2.AddChild(node4);
                        node2.SetHasEvents(node2.HasEvents() | node4.HasEvents());
                    }
                    {
                        Action_bt_HoverBotBT_node1 node1 = new Action_bt_HoverBotBT_node1();
                        node1.SetClassNameString("Action");
                        node1.SetId(1);
#if !BEHAVIAC_RELEASE
                        node1.SetAgentType("HoverBotAgent");
#endif
                        node2.AddChild(node1);
                        node2.SetHasEvents(node2.HasEvents() | node1.HasEvents());
                    }
                    node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
                }
                {
                    Selector node5 = new Selector();
                    node5.SetClassNameString("Selector");
                    node5.SetId(5);
#if !BEHAVIAC_RELEASE
                    node5.SetAgentType("HoverBotAgent");
#endif
                    node0.AddChild(node5);
                    {
                        Sequence node6 = new Sequence();
                        node6.SetClassNameString("Sequence");
                        node6.SetId(6);
#if !BEHAVIAC_RELEASE
                        node6.SetAgentType("HoverBotAgent");
#endif
                        node5.AddChild(node6);
                        {
                            Condition_bt_HoverBotBT_node7 node7 = new Condition_bt_HoverBotBT_node7();
                            node7.SetClassNameString("Condition");
                            node7.SetId(7);
#if !BEHAVIAC_RELEASE
                            node7.SetAgentType("HoverBotAgent");
#endif
                            node6.AddChild(node7);
                            node6.SetHasEvents(node6.HasEvents() | node7.HasEvents());
                        }
                        {
                            Action_bt_HoverBotBT_node8 node8 = new Action_bt_HoverBotBT_node8();
                            node8.SetClassNameString("Action");
                            node8.SetId(8);
#if !BEHAVIAC_RELEASE
                            node8.SetAgentType("HoverBotAgent");
#endif
                            node6.AddChild(node8);
                            node6.SetHasEvents(node6.HasEvents() | node8.HasEvents());
                        }
                        node5.SetHasEvents(node5.HasEvents() | node6.HasEvents());
                    }
                    {
                        Sequence node12 = new Sequence();
                        node12.SetClassNameString("Sequence");
                        node12.SetId(12);
#if !BEHAVIAC_RELEASE
                        node12.SetAgentType("HoverBotAgent");
#endif
                        node5.AddChild(node12);
                        {
                            Condition_bt_HoverBotBT_node11 node11 = new Condition_bt_HoverBotBT_node11();
                            node11.SetClassNameString("Condition");
                            node11.SetId(11);
#if !BEHAVIAC_RELEASE
                            node11.SetAgentType("HoverBotAgent");
#endif
                            node12.AddChild(node11);
                            node12.SetHasEvents(node12.HasEvents() | node11.HasEvents());
                        }
                        {
                            Selector node20 = new Selector();
                            node20.SetClassNameString("Selector");
                            node20.SetId(20);
#if !BEHAVIAC_RELEASE
                            node20.SetAgentType("HoverBotAgent");
#endif
                            node12.AddChild(node20);
                            {
                                Sequence node15 = new Sequence();
                                node15.SetClassNameString("Sequence");
                                node15.SetId(15);
#if !BEHAVIAC_RELEASE
                                node15.SetAgentType("HoverBotAgent");
#endif
                                node20.AddChild(node15);
                                {
                                    Condition_bt_HoverBotBT_node16 node16 = new Condition_bt_HoverBotBT_node16();
                                    node16.SetClassNameString("Condition");
                                    node16.SetId(16);
#if !BEHAVIAC_RELEASE
                                    node16.SetAgentType("HoverBotAgent");
#endif
                                    node15.AddChild(node16);
                                    node15.SetHasEvents(node15.HasEvents() | node16.HasEvents());
                                }
                                {
                                    Action_bt_HoverBotBT_node21 node21 = new Action_bt_HoverBotBT_node21();
                                    node21.SetClassNameString("Action");
                                    node21.SetId(21);
#if !BEHAVIAC_RELEASE
                                    node21.SetAgentType("HoverBotAgent");
#endif
                                    node15.AddChild(node21);
                                    node15.SetHasEvents(node15.HasEvents() | node21.HasEvents());
                                }
                                {
                                    Action_bt_HoverBotBT_node14 node14 = new Action_bt_HoverBotBT_node14();
                                    node14.SetClassNameString("Action");
                                    node14.SetId(14);
#if !BEHAVIAC_RELEASE
                                    node14.SetAgentType("HoverBotAgent");
#endif
                                    node15.AddChild(node14);
                                    node15.SetHasEvents(node15.HasEvents() | node14.HasEvents());
                                }
                                node20.SetHasEvents(node20.HasEvents() | node15.HasEvents());
                            }
                            {
                                Action_bt_HoverBotBT_node13 node13 = new Action_bt_HoverBotBT_node13();
                                node13.SetClassNameString("Action");
                                node13.SetId(13);
#if !BEHAVIAC_RELEASE
                                node13.SetAgentType("HoverBotAgent");
#endif
                                node20.AddChild(node13);
                                node20.SetHasEvents(node20.HasEvents() | node13.HasEvents());
                            }
                            node12.SetHasEvents(node12.HasEvents() | node20.HasEvents());
                        }
                        node5.SetHasEvents(node5.HasEvents() | node12.HasEvents());
                    }
                    {
                        Selector node17 = new Selector();
                        node17.SetClassNameString("Selector");
                        node17.SetId(17);
#if !BEHAVIAC_RELEASE
                        node17.SetAgentType("HoverBotAgent");
#endif
                        node5.AddChild(node17);
                        {
                            Sequence node9 = new Sequence();
                            node9.SetClassNameString("Sequence");
                            node9.SetId(9);
#if !BEHAVIAC_RELEASE
                            node9.SetAgentType("HoverBotAgent");
#endif
                            node17.AddChild(node9);
                            {
                                Condition_bt_HoverBotBT_node18 node18 = new Condition_bt_HoverBotBT_node18();
                                node18.SetClassNameString("Condition");
                                node18.SetId(18);
#if !BEHAVIAC_RELEASE
                                node18.SetAgentType("HoverBotAgent");
#endif
                                node9.AddChild(node18);
                                node9.SetHasEvents(node9.HasEvents() | node18.HasEvents());
                            }
                            {
                                Action_bt_HoverBotBT_node10 node10 = new Action_bt_HoverBotBT_node10();
                                node10.SetClassNameString("Action");
                                node10.SetId(10);
#if !BEHAVIAC_RELEASE
                                node10.SetAgentType("HoverBotAgent");
#endif
                                node9.AddChild(node10);
                                node9.SetHasEvents(node9.HasEvents() | node10.HasEvents());
                            }
                            {
                                Action_bt_HoverBotBT_node3 node3 = new Action_bt_HoverBotBT_node3();
                                node3.SetClassNameString("Action");
                                node3.SetId(3);
#if !BEHAVIAC_RELEASE
                                node3.SetAgentType("HoverBotAgent");
#endif
                                node9.AddChild(node3);
                                node9.SetHasEvents(node9.HasEvents() | node3.HasEvents());
                            }
                            node17.SetHasEvents(node17.HasEvents() | node9.HasEvents());
                        }
                        {
                            Action_bt_HoverBotBT_node19 node19 = new Action_bt_HoverBotBT_node19();
                            node19.SetClassNameString("Action");
                            node19.SetId(19);
#if !BEHAVIAC_RELEASE
                            node19.SetAgentType("HoverBotAgent");
#endif
                            node17.AddChild(node19);
                            node17.SetHasEvents(node17.HasEvents() | node19.HasEvents());
                        }
                        node5.SetHasEvents(node5.HasEvents() | node17.HasEvents());
                    }
                    node0.SetHasEvents(node0.HasEvents() | node5.HasEvents());
                }
                bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
            }
            return(true);
        }