当前位置: 首页>>代码示例>>C#>>正文


C# Selector.SetCustomCondition方法代码示例

本文整理汇总了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();
//.........这里部分代码省略.........
开发者ID:Just4F,项目名称:behaviac,代码行数:101,代码来源:generated_behaviors.cs


注:本文中的behaviac.Selector.SetCustomCondition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。