public static bool build_behavior_tree(BehaviorTree bt) { bt.SetClassNameString("BehaviorTree"); bt.SetId(-1); bt.SetName("FSM_Ctrl"); bt.IsFSM = true; #if !BEHAVIAC_RELEASE bt.SetAgentType("FSM_Ctrl"); #endif // attachments // children { FSM fsm = new FSM(); fsm.SetClassNameString("FSM"); fsm.SetId(-1); fsm.InitialId = 1; #if !BEHAVIAC_RELEASE fsm.SetAgentType("FSM_Ctrl"); #endif { State_bt_FSM_Ctrl_node1 node1 = new State_bt_FSM_Ctrl_node1(); node1.SetClassNameString("State"); node1.SetId(1); #if !BEHAVIAC_RELEASE node1.SetAgentType("FSM_Ctrl"); #endif // attachments { Precondition_bt_FSM_Ctrl_attach6 attach6 = new Precondition_bt_FSM_Ctrl_attach6(); attach6.SetClassNameString("Precondition"); attach6.SetId(6); #if !BEHAVIAC_RELEASE attach6.SetAgentType("FSM_Ctrl"); #endif node1.Attach(attach6, true, false, false); } { Precondition_bt_FSM_Ctrl_attach7 attach7 = new Precondition_bt_FSM_Ctrl_attach7(); attach7.SetClassNameString("Precondition"); attach7.SetId(7); #if !BEHAVIAC_RELEASE attach7.SetAgentType("FSM_Ctrl"); #endif node1.Attach(attach7, true, false, false); } { Transition_bt_FSM_Ctrl_attach4 attach4 = new Transition_bt_FSM_Ctrl_attach4(); attach4.SetClassNameString("Transition"); attach4.SetId(4); #if !BEHAVIAC_RELEASE attach4.SetAgentType("FSM_Ctrl"); #endif node1.Attach(attach4, false, false, true); } { Transition_bt_FSM_Ctrl_attach5 attach5 = new Transition_bt_FSM_Ctrl_attach5(); attach5.SetClassNameString("Transition"); attach5.SetId(5); #if !BEHAVIAC_RELEASE attach5.SetAgentType("FSM_Ctrl"); #endif node1.Attach(attach5, false, false, true); } fsm.AddChild(node1); fsm.SetHasEvents(fsm.HasEvents() | node1.HasEvents()); } { State_bt_FSM_Ctrl_node2 node2 = new State_bt_FSM_Ctrl_node2(); node2.SetClassNameString("State"); node2.SetId(2); #if !BEHAVIAC_RELEASE node2.SetAgentType("FSM_Ctrl"); #endif fsm.AddChild(node2); fsm.SetHasEvents(fsm.HasEvents() | node2.HasEvents()); } { State_bt_FSM_Ctrl_node3 node3 = new State_bt_FSM_Ctrl_node3(); node3.SetClassNameString("State"); node3.SetId(3); #if !BEHAVIAC_RELEASE node3.SetAgentType("FSM_Ctrl"); #endif // attachments { Precondition_bt_FSM_Ctrl_attach12 attach12 = new Precondition_bt_FSM_Ctrl_attach12(); attach12.SetClassNameString("Precondition"); attach12.SetId(12); #if !BEHAVIAC_RELEASE attach12.SetAgentType("FSM_Ctrl"); #endif node3.Attach(attach12, true, false, false); } { Transition_bt_FSM_Ctrl_attach8 attach8 = new Transition_bt_FSM_Ctrl_attach8(); attach8.SetClassNameString("Transition"); attach8.SetId(8); #if !BEHAVIAC_RELEASE attach8.SetAgentType("FSM_Ctrl"); #endif node3.Attach(attach8, false, false, true); } fsm.AddChild(node3); fsm.SetHasEvents(fsm.HasEvents() | node3.HasEvents()); } { State_bt_FSM_Ctrl_node9 node9 = new State_bt_FSM_Ctrl_node9(); node9.SetClassNameString("State"); node9.SetId(9); #if !BEHAVIAC_RELEASE node9.SetAgentType("FSM_Ctrl"); #endif // attachments { Precondition_bt_FSM_Ctrl_attach11 attach11 = new Precondition_bt_FSM_Ctrl_attach11(); attach11.SetClassNameString("Precondition"); attach11.SetId(11); #if !BEHAVIAC_RELEASE attach11.SetAgentType("FSM_Ctrl"); #endif node9.Attach(attach11, true, false, false); } { Transition_bt_FSM_Ctrl_attach10 attach10 = new Transition_bt_FSM_Ctrl_attach10(); attach10.SetClassNameString("Transition"); attach10.SetId(10); #if !BEHAVIAC_RELEASE attach10.SetAgentType("FSM_Ctrl"); #endif node9.Attach(attach10, false, false, true); } fsm.AddChild(node9); fsm.SetHasEvents(fsm.HasEvents() | node9.HasEvents()); } bt.AddChild(fsm); } return(true); }
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; }
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; }
public static bool build_behavior_tree(BehaviorTree bt) { bt.SetClassNameString("BehaviorTree"); bt.SetId(-1); bt.SetName("node_test/fsm/fsm_ut_0"); 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_ut_0_node3 node3 = new State_bt_node_test_fsm_fsm_ut_0_node3(); node3.SetClassNameString("State"); node3.SetId(3); #if !BEHAVIAC_RELEASE node3.SetAgentType("FSMAgentTest"); #endif // attachments { Precondition_bt_node_test_fsm_fsm_ut_0_attach10 attach10 = new Precondition_bt_node_test_fsm_fsm_ut_0_attach10(); attach10.SetClassNameString("Precondition"); attach10.SetId(10); #if !BEHAVIAC_RELEASE attach10.SetAgentType("FSMAgentTest"); #endif node3.Attach(attach10, true, false, false); } { Precondition_bt_node_test_fsm_fsm_ut_0_attach2 attach2 = new Precondition_bt_node_test_fsm_fsm_ut_0_attach2(); attach2.SetClassNameString("Precondition"); attach2.SetId(2); #if !BEHAVIAC_RELEASE attach2.SetAgentType("FSMAgentTest"); #endif node3.Attach(attach2, true, false, false); } { Transition_bt_node_test_fsm_fsm_ut_0_attach5 attach5 = new Transition_bt_node_test_fsm_fsm_ut_0_attach5(); attach5.SetClassNameString("Transition"); attach5.SetId(5); #if !BEHAVIAC_RELEASE attach5.SetAgentType("FSMAgentTest"); #endif node3.Attach(attach5, false, false, true); } fsm.AddChild(node3); fsm.SetHasEvents(fsm.HasEvents() | node3.HasEvents()); } { State_bt_node_test_fsm_fsm_ut_0_node1 node1 = new State_bt_node_test_fsm_fsm_ut_0_node1(); node1.SetClassNameString("State"); node1.SetId(1); #if !BEHAVIAC_RELEASE node1.SetAgentType("FSMAgentTest"); #endif // attachments { Precondition_bt_node_test_fsm_fsm_ut_0_attach6 attach6 = new Precondition_bt_node_test_fsm_fsm_ut_0_attach6(); attach6.SetClassNameString("Precondition"); attach6.SetId(6); #if !BEHAVIAC_RELEASE attach6.SetAgentType("FSMAgentTest"); #endif node1.Attach(attach6, true, false, false); } { Precondition_bt_node_test_fsm_fsm_ut_0_attach11 attach11 = new Precondition_bt_node_test_fsm_fsm_ut_0_attach11(); attach11.SetClassNameString("Precondition"); attach11.SetId(11); #if !BEHAVIAC_RELEASE attach11.SetAgentType("FSMAgentTest"); #endif node1.Attach(attach11, true, false, false); } { Transition_bt_node_test_fsm_fsm_ut_0_attach7 attach7 = new Transition_bt_node_test_fsm_fsm_ut_0_attach7(); attach7.SetClassNameString("Transition"); attach7.SetId(7); #if !BEHAVIAC_RELEASE attach7.SetAgentType("FSMAgentTest"); #endif node1.Attach(attach7, false, false, true); } { Transition_bt_node_test_fsm_fsm_ut_0_attach12 attach12 = new Transition_bt_node_test_fsm_fsm_ut_0_attach12(); attach12.SetClassNameString("Transition"); attach12.SetId(12); #if !BEHAVIAC_RELEASE attach12.SetAgentType("FSMAgentTest"); #endif node1.Attach(attach12, false, false, true); } fsm.AddChild(node1); fsm.SetHasEvents(fsm.HasEvents() | node1.HasEvents()); } { State_bt_node_test_fsm_fsm_ut_0_node4 node4 = new State_bt_node_test_fsm_fsm_ut_0_node4(); node4.SetClassNameString("State"); node4.SetId(4); #if !BEHAVIAC_RELEASE node4.SetAgentType("FSMAgentTest"); #endif // attachments { Precondition_bt_node_test_fsm_fsm_ut_0_attach9 attach9 = new Precondition_bt_node_test_fsm_fsm_ut_0_attach9(); attach9.SetClassNameString("Precondition"); attach9.SetId(9); #if !BEHAVIAC_RELEASE attach9.SetAgentType("FSMAgentTest"); #endif node4.Attach(attach9, true, false, false); } { Transition_bt_node_test_fsm_fsm_ut_0_attach8 attach8 = new Transition_bt_node_test_fsm_fsm_ut_0_attach8(); attach8.SetClassNameString("Transition"); attach8.SetId(8); #if !BEHAVIAC_RELEASE attach8.SetAgentType("FSMAgentTest"); #endif node4.Attach(attach8, false, false, true); } fsm.AddChild(node4); fsm.SetHasEvents(fsm.HasEvents() | node4.HasEvents()); } bt.AddChild(fsm); } return true; }
public static bool build_behavior_tree(BehaviorTree bt) { bt.SetClassNameString("BehaviorTree"); bt.SetId(-1); bt.SetName("Tank_FSM_MoveFire"); bt.IsFSM = true; #if !BEHAVIAC_RELEASE bt.SetAgentType("Player"); #endif // pars bt.AddPar("Player", "float", "rotateAngle", "0"); bt.AddPar("Player", "Player", "parIn_Self", "null"); // attachments // children { FSM fsm = new FSM(); fsm.SetClassNameString("FSM"); fsm.SetId(-1); fsm.InitialId = 1; #if !BEHAVIAC_RELEASE fsm.SetAgentType("Player"); #endif { State_bt_Tank_FSM_MoveFire_node1 node1 = new State_bt_Tank_FSM_MoveFire_node1(); node1.SetClassNameString("State"); node1.SetId(1); #if !BEHAVIAC_RELEASE node1.SetAgentType("Player"); #endif // attachments { Precondition_bt_Tank_FSM_MoveFire_attach4 attach4 = new Precondition_bt_Tank_FSM_MoveFire_attach4(); attach4.SetClassNameString("Precondition"); attach4.SetId(4); #if !BEHAVIAC_RELEASE attach4.SetAgentType("Player"); #endif node1.Attach(attach4, true, false, false); } { Transition_bt_Tank_FSM_MoveFire_attach5 attach5 = new Transition_bt_Tank_FSM_MoveFire_attach5(); attach5.SetClassNameString("Transition"); attach5.SetId(5); #if !BEHAVIAC_RELEASE attach5.SetAgentType("Player"); #endif node1.Attach(attach5, false, false, true); } fsm.AddChild(node1); fsm.SetHasEvents(fsm.HasEvents() | node1.HasEvents()); } { State_bt_Tank_FSM_MoveFire_node2 node2 = new State_bt_Tank_FSM_MoveFire_node2(); node2.SetClassNameString("State"); node2.SetId(2); #if !BEHAVIAC_RELEASE node2.SetAgentType("Player"); #endif // attachments { Precondition_bt_Tank_FSM_MoveFire_attach3 attach3 = new Precondition_bt_Tank_FSM_MoveFire_attach3(); attach3.SetClassNameString("Precondition"); attach3.SetId(3); #if !BEHAVIAC_RELEASE attach3.SetAgentType("Player"); #endif node2.Attach(attach3, true, false, false); } { Transition_bt_Tank_FSM_MoveFire_attach6 attach6 = new Transition_bt_Tank_FSM_MoveFire_attach6(); attach6.SetClassNameString("Transition"); attach6.SetId(6); #if !BEHAVIAC_RELEASE attach6.SetAgentType("Player"); #endif node2.Attach(attach6, false, false, true); } { Transition_bt_Tank_FSM_MoveFire_attach10 attach10 = new Transition_bt_Tank_FSM_MoveFire_attach10(); attach10.SetClassNameString("Transition"); attach10.SetId(10); #if !BEHAVIAC_RELEASE attach10.SetAgentType("Player"); #endif node2.Attach(attach10, false, false, true); } fsm.AddChild(node2); fsm.SetHasEvents(fsm.HasEvents() | node2.HasEvents()); } { State_bt_Tank_FSM_MoveFire_node7 node7 = new State_bt_Tank_FSM_MoveFire_node7(); node7.SetClassNameString("State"); node7.SetId(7); #if !BEHAVIAC_RELEASE node7.SetAgentType("Player"); #endif // attachments { Precondition_bt_Tank_FSM_MoveFire_attach12 attach12 = new Precondition_bt_Tank_FSM_MoveFire_attach12(); attach12.SetClassNameString("Precondition"); attach12.SetId(12); #if !BEHAVIAC_RELEASE attach12.SetAgentType("Player"); #endif node7.Attach(attach12, true, false, false); } { Transition_bt_Tank_FSM_MoveFire_attach8 attach8 = new Transition_bt_Tank_FSM_MoveFire_attach8(); attach8.SetClassNameString("Transition"); attach8.SetId(8); #if !BEHAVIAC_RELEASE attach8.SetAgentType("Player"); #endif node7.Attach(attach8, false, false, true); } fsm.AddChild(node7); fsm.SetHasEvents(fsm.HasEvents() | node7.HasEvents()); } { State_bt_Tank_FSM_MoveFire_node9 node9 = new State_bt_Tank_FSM_MoveFire_node9(); node9.SetClassNameString("State"); node9.SetId(9); #if !BEHAVIAC_RELEASE node9.SetAgentType("Player"); #endif // attachments { Transition_bt_Tank_FSM_MoveFire_attach11 attach11 = new Transition_bt_Tank_FSM_MoveFire_attach11(); attach11.SetClassNameString("Transition"); attach11.SetId(11); #if !BEHAVIAC_RELEASE attach11.SetAgentType("Player"); #endif node9.Attach(attach11, false, false, true); } fsm.AddChild(node9); fsm.SetHasEvents(fsm.HasEvents() | node9.HasEvents()); } bt.AddChild(fsm); } return true; }
public static bool build_behavior_tree(BehaviorTree bt) { bt.SetClassNameString("BehaviorTree"); bt.SetId(-1); bt.SetName("FSM_Unit_ForceATK"); bt.IsFSM = true; #if !BEHAVIAC_RELEASE bt.SetAgentType("Unit"); #endif // attachments // children { FSM fsm = new FSM(); fsm.SetClassNameString("FSM"); fsm.SetId(-1); fsm.InitialId = 5; #if !BEHAVIAC_RELEASE fsm.SetAgentType("Unit"); #endif { State_bt_FSM_Unit_ForceATK_node1 node1 = new State_bt_FSM_Unit_ForceATK_node1(); node1.SetClassNameString("State"); node1.SetId(1); #if !BEHAVIAC_RELEASE node1.SetAgentType("Unit"); #endif // attachments { Transition_bt_FSM_Unit_ForceATK_attach3 attach3 = new Transition_bt_FSM_Unit_ForceATK_attach3(); attach3.SetClassNameString("Transition"); attach3.SetId(3); #if !BEHAVIAC_RELEASE attach3.SetAgentType("Unit"); #endif node1.Attach(attach3, false, false, true); } fsm.AddChild(node1); fsm.SetHasEvents(fsm.HasEvents() | node1.HasEvents()); } { State_bt_FSM_Unit_ForceATK_node2 node2 = new State_bt_FSM_Unit_ForceATK_node2(); node2.SetClassNameString("State"); node2.SetId(2); #if !BEHAVIAC_RELEASE node2.SetAgentType("Unit"); #endif // attachments { Transition_bt_FSM_Unit_ForceATK_attach4 attach4 = new Transition_bt_FSM_Unit_ForceATK_attach4(); attach4.SetClassNameString("Transition"); attach4.SetId(4); #if !BEHAVIAC_RELEASE attach4.SetAgentType("Unit"); #endif node2.Attach(attach4, false, false, true); } fsm.AddChild(node2); fsm.SetHasEvents(fsm.HasEvents() | node2.HasEvents()); } { State_bt_FSM_Unit_ForceATK_node5 node5 = new State_bt_FSM_Unit_ForceATK_node5(); node5.SetClassNameString("State"); node5.SetId(5); #if !BEHAVIAC_RELEASE node5.SetAgentType("Unit"); #endif // attachments { Transition_bt_FSM_Unit_ForceATK_attach6 attach6 = new Transition_bt_FSM_Unit_ForceATK_attach6(); attach6.SetClassNameString("Transition"); attach6.SetId(6); #if !BEHAVIAC_RELEASE attach6.SetAgentType("Unit"); #endif node5.Attach(attach6, false, false, true); } { Transition_bt_FSM_Unit_ForceATK_attach7 attach7 = new Transition_bt_FSM_Unit_ForceATK_attach7(); attach7.SetClassNameString("Transition"); attach7.SetId(7); #if !BEHAVIAC_RELEASE attach7.SetAgentType("Unit"); #endif node5.Attach(attach7, false, false, true); } fsm.AddChild(node5); fsm.SetHasEvents(fsm.HasEvents() | node5.HasEvents()); } bt.AddChild(fsm); } return(true); }