本文整理汇总了C#中behaviac.BehaviorTree.AddPar方法的典型用法代码示例。如果您正苦于以下问题:C# BehaviorTree.AddPar方法的具体用法?C# BehaviorTree.AddPar怎么用?C# BehaviorTree.AddPar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类behaviac.BehaviorTree
的用法示例。
在下文中一共展示了BehaviorTree.AddPar方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: build_behavior_tree
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;
}
示例2: build_behavior_tree
public static bool build_behavior_tree(BehaviorTree bt)
{
bt.SetClassNameString("BehaviorTree");
bt.SetId(-1);
bt.SetName("Level_DeathMatch_0");
#if !BEHAVIAC_RELEASE
bt.SetAgentType("GameLevelCommon");
#endif
// pars
bt.AddPar("int", "parT_SpawnCountPerWave", "0", "");
bt.AddPar("int", "parT_WaveCount", "10", "");
bt.AddPar("int", "parT_AwardType", "0", "");
bt.AddPar("int", "parT_AwardX", "0", "");
bt.AddPar("int", "parT_AwardY", "0", "");
bt.AddPar("int", "parT_EnemyCount", "0", "");
bt.AddPar("bool", "parT_GameStopped", "false", "");
// children
{
DecoratorLoop_bt_Level_DeathMatch_0_node1 node1 = new DecoratorLoop_bt_Level_DeathMatch_0_node1();
node1.SetClassNameString("DecoratorLoop");
node1.SetId(1);
#if !BEHAVIAC_RELEASE
node1.SetAgentType("GameLevelCommon");
#endif
bt.AddChild(node1);
{
Parallel_bt_Level_DeathMatch_0_node16 node16 = new Parallel_bt_Level_DeathMatch_0_node16();
node16.SetClassNameString("Parallel");
node16.SetId(16);
#if !BEHAVIAC_RELEASE
node16.SetAgentType("GameLevelCommon");
#endif
node1.AddChild(node16);
{
IfElse node17 = new IfElse();
node17.SetClassNameString("IfElse");
node17.SetId(17);
#if !BEHAVIAC_RELEASE
node17.SetAgentType("GameLevelCommon");
#endif
node16.AddChild(node17);
{
Condition_bt_Level_DeathMatch_0_node11 node11 = new Condition_bt_Level_DeathMatch_0_node11();
node11.SetClassNameString("Condition");
node11.SetId(11);
#if !BEHAVIAC_RELEASE
node11.SetAgentType("GameLevelCommon");
#endif
node17.AddChild(node11);
node17.SetHasEvents(node17.HasEvents() | node11.HasEvents());
}
{
Sequence node5 = new Sequence();
node5.SetClassNameString("Sequence");
node5.SetId(5);
#if !BEHAVIAC_RELEASE
node5.SetAgentType("GameLevelCommon");
#endif
node17.AddChild(node5);
{
Wait_bt_Level_DeathMatch_0_node14 node14 = new Wait_bt_Level_DeathMatch_0_node14();
node14.SetClassNameString("Wait");
node14.SetId(14);
#if !BEHAVIAC_RELEASE
node14.SetAgentType("GameLevelCommon");
#endif
node5.AddChild(node14);
node5.SetHasEvents(node5.HasEvents() | node14.HasEvents());
}
{
Assignment_bt_Level_DeathMatch_0_node15 node15 = new Assignment_bt_Level_DeathMatch_0_node15();
node15.SetClassNameString("Assignment");
node15.SetId(15);
#if !BEHAVIAC_RELEASE
node15.SetAgentType("GameLevelCommon");
#endif
node5.AddChild(node15);
node5.SetHasEvents(node5.HasEvents() | node15.HasEvents());
}
{
DecoratorNot_bt_Level_DeathMatch_0_node12 node12 = new DecoratorNot_bt_Level_DeathMatch_0_node12();
node12.SetClassNameString("DecoratorNot");
node12.SetId(12);
#if !BEHAVIAC_RELEASE
node12.SetAgentType("GameLevelCommon");
#endif
node5.AddChild(node12);
{
DecoratorLoopUntil_bt_Level_DeathMatch_0_node6 node6 = new DecoratorLoopUntil_bt_Level_DeathMatch_0_node6();
node6.SetClassNameString("DecoratorLoopUntil");
node6.SetId(6);
#if !BEHAVIAC_RELEASE
node6.SetAgentType("GameLevelCommon");
#endif
node12.AddChild(node6);
{
Sequence node0 = new Sequence();
node0.SetClassNameString("Sequence");
node0.SetId(0);
#if !BEHAVIAC_RELEASE
//.........这里部分代码省略.........
示例3: build_behavior_tree
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;
}