本文整理汇总了C#中behaviac.Selector.SetCustomCondition方法的典型用法代码示例。如果您正苦于以下问题:C# Selector.SetCustomCondition方法的具体用法?C# Selector.SetCustomCondition怎么用?C# Selector.SetCustomCondition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类behaviac.Selector
的用法示例。
在下文中一共展示了Selector.SetCustomCondition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: build_behavior_tree
public static bool build_behavior_tree(BehaviorTree bt)
{
bt.SetClassNameString("BehaviorTree");
bt.SetId(-1);
bt.SetName("node_test/predicate_selector_ut_5");
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);
{
DecoratorNot_bt_node_test_predicate_selector_ut_5_node1 node1 = new DecoratorNot_bt_node_test_predicate_selector_ut_5_node1();
node1.SetClassNameString("DecoratorNot");
node1.SetId(1);
#if !BEHAVIAC_RELEASE
node1.SetAgentType("AgentNodeTest");
#endif
node0.SetCustomCondition(node1);
{
Selector node3 = new Selector();
node3.SetClassNameString("Selector");
node3.SetId(3);
#if !BEHAVIAC_RELEASE
node3.SetAgentType("AgentNodeTest");
#endif
node1.AddChild(node3);
{
Sequence node6 = new Sequence();
node6.SetClassNameString("Sequence");
node6.SetId(6);
#if !BEHAVIAC_RELEASE
node6.SetAgentType("AgentNodeTest");
#endif
node3.AddChild(node6);
{
Condition_bt_node_test_predicate_selector_ut_5_node8 node8 = new Condition_bt_node_test_predicate_selector_ut_5_node8();
node8.SetClassNameString("Condition");
node8.SetId(8);
#if !BEHAVIAC_RELEASE
node8.SetAgentType("AgentNodeTest");
#endif
node6.AddChild(node8);
node6.SetHasEvents(node6.HasEvents() | node8.HasEvents());
}
{
Condition_bt_node_test_predicate_selector_ut_5_node9 node9 = new Condition_bt_node_test_predicate_selector_ut_5_node9();
node9.SetClassNameString("Condition");
node9.SetId(9);
#if !BEHAVIAC_RELEASE
node9.SetAgentType("AgentNodeTest");
#endif
node6.AddChild(node9);
node6.SetHasEvents(node6.HasEvents() | node9.HasEvents());
}
node3.SetHasEvents(node3.HasEvents() | node6.HasEvents());
}
{
Condition_bt_node_test_predicate_selector_ut_5_node10 node10 = new Condition_bt_node_test_predicate_selector_ut_5_node10();
node10.SetClassNameString("Condition");
node10.SetId(10);
#if !BEHAVIAC_RELEASE
node10.SetAgentType("AgentNodeTest");
#endif
node3.AddChild(node10);
node3.SetHasEvents(node3.HasEvents() | node10.HasEvents());
}
node1.SetHasEvents(node1.HasEvents() | node3.HasEvents());
}
node0.SetHasEvents(node0.HasEvents() | node1.HasEvents());
}
{
Action_bt_node_test_predicate_selector_ut_5_node5 node5 = new Action_bt_node_test_predicate_selector_ut_5_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_predicate_selector_ut_5_node4 node4 = new Action_bt_node_test_predicate_selector_ut_5_node4();
node4.SetClassNameString("Action");
node4.SetId(4);
#if !BEHAVIAC_RELEASE
node4.SetAgentType("AgentNodeTest");
#endif
node0.AddChild(node4);
node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
}
{
Action_bt_node_test_predicate_selector_ut_5_node2 node2 = new Action_bt_node_test_predicate_selector_ut_5_node2();
//.........这里部分代码省略.........