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


C# Sequence.SetCustomCondition方法代码示例

本文整理汇总了C#中behaviac.Sequence.SetCustomCondition方法的典型用法代码示例。如果您正苦于以下问题:C# Sequence.SetCustomCondition方法的具体用法?C# Sequence.SetCustomCondition怎么用?C# Sequence.SetCustomCondition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在behaviac.Sequence的用法示例。


在下文中一共展示了Sequence.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_sequence_ut_5");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("AgentNodeTest");
#endif
			// children
			{
				Sequence node0 = new Sequence();
				node0.SetClassNameString("Sequence");
				node0.SetId(0);
#if !BEHAVIAC_RELEASE
				node0.SetAgentType("AgentNodeTest");
#endif
				bt.AddChild(node0);
				{
					DecoratorNot_bt_node_test_predicate_sequence_ut_5_node1 node1 = new DecoratorNot_bt_node_test_predicate_sequence_ut_5_node1();
					node1.SetClassNameString("DecoratorNot");
					node1.SetId(1);
#if !BEHAVIAC_RELEASE
					node1.SetAgentType("AgentNodeTest");
#endif
					node0.SetCustomCondition(node1);
					{
						Sequence node3 = new Sequence();
						node3.SetClassNameString("Sequence");
						node3.SetId(3);
#if !BEHAVIAC_RELEASE
						node3.SetAgentType("AgentNodeTest");
#endif
						node1.AddChild(node3);
						{
							Selector node6 = new Selector();
							node6.SetClassNameString("Selector");
							node6.SetId(6);
#if !BEHAVIAC_RELEASE
							node6.SetAgentType("AgentNodeTest");
#endif
							node3.AddChild(node6);
							{
								Condition_bt_node_test_predicate_sequence_ut_5_node8 node8 = new Condition_bt_node_test_predicate_sequence_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_sequence_ut_5_node9 node9 = new Condition_bt_node_test_predicate_sequence_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_sequence_ut_5_node10 node10 = new Condition_bt_node_test_predicate_sequence_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_sequence_ut_5_node5 node5 = new Action_bt_node_test_predicate_sequence_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_sequence_ut_5_node4 node4 = new Action_bt_node_test_predicate_sequence_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_sequence_ut_5_node2 node2 = new Action_bt_node_test_predicate_sequence_ut_5_node2();
//.........这里部分代码省略.........
开发者ID:Just4F,项目名称:behaviac,代码行数:101,代码来源:generated_behaviors.cs


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