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


C# Selector.HasEvents方法代码示例

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


在下文中一共展示了Selector.HasEvents方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: build_behavior_tree

		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/PreconditionEffectorTest/PreconditionEffectorTest_0");
			bt.IsFSM = false;
#if !BEHAVIAC_RELEASE
			bt.SetAgentType("PreconEffectorAgent");
#endif
			// children
			{
				Selector node3 = new Selector();
				node3.SetClassNameString("Selector");
				node3.SetId(3);
#if !BEHAVIAC_RELEASE
				node3.SetAgentType("PreconEffectorAgent");
#endif
				// attachments
				{
					Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach0 attach0 = new Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach0();
					attach0.SetClassNameString("Precondition");
					attach0.SetId(0);
#if !BEHAVIAC_RELEASE
					attach0.SetAgentType("PreconEffectorAgent");
#endif
					node3.Attach(attach0, true, false, false);
				}
				bt.AddChild(node3);
				{
					Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_node8 node8 = new Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_node8();
					node8.SetClassNameString("Action");
					node8.SetId(8);
#if !BEHAVIAC_RELEASE
					node8.SetAgentType("PreconEffectorAgent");
#endif
					// attachments
					{
						Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach1 attach1 = new Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach1();
						attach1.SetClassNameString("Precondition");
						attach1.SetId(1);
#if !BEHAVIAC_RELEASE
						attach1.SetAgentType("PreconEffectorAgent");
#endif
						node8.Attach(attach1, true, false, false);
					}
					{
						Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach2 attach2 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach2();
						attach2.SetClassNameString("Effector");
						attach2.SetId(2);
#if !BEHAVIAC_RELEASE
						attach2.SetAgentType("PreconEffectorAgent");
#endif
						node8.Attach(attach2, false, true, false);
					}
					{
						Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach4 attach4 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach4();
						attach4.SetClassNameString("Effector");
						attach4.SetId(4);
#if !BEHAVIAC_RELEASE
						attach4.SetAgentType("PreconEffectorAgent");
#endif
						node8.Attach(attach4, false, true, false);
					}
					node3.AddChild(node8);
					node3.SetHasEvents(node3.HasEvents() | node8.HasEvents());
				}
				{
					Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_node9 node9 = new Action_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_node9();
					node9.SetClassNameString("Action");
					node9.SetId(9);
#if !BEHAVIAC_RELEASE
					node9.SetAgentType("PreconEffectorAgent");
#endif
					// attachments
					{
						Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach10 attach10 = new Precondition_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach10();
						attach10.SetClassNameString("Precondition");
						attach10.SetId(10);
#if !BEHAVIAC_RELEASE
						attach10.SetAgentType("PreconEffectorAgent");
#endif
						node9.Attach(attach10, true, false, false);
					}
					{
						Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach5 attach5 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach5();
						attach5.SetClassNameString("Effector");
						attach5.SetId(5);
#if !BEHAVIAC_RELEASE
						attach5.SetAgentType("PreconEffectorAgent");
#endif
						node9.Attach(attach5, false, true, false);
					}
					{
						Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach6 attach6 = new Effector_bt_node_test_PreconditionEffectorTest_PreconditionEffectorTest_0_attach6();
						attach6.SetClassNameString("Effector");
						attach6.SetId(6);
#if !BEHAVIAC_RELEASE
						attach6.SetAgentType("PreconEffectorAgent");
#endif
						node9.Attach(attach6, false, true, false);
//.........这里部分代码省略.........
开发者ID:Just4F,项目名称:behaviac,代码行数:101,代码来源:generated_behaviors.cs

示例2: build_behavior_tree

 public static bool build_behavior_tree(BehaviorTree bt)
 {
     bt.SetClassNameString("BehaviorTree");
     bt.SetId(-1);
     bt.SetName("Tank_WalkUtilCollision");
     #if !BEHAVIAC_RELEASE
     bt.SetAgentType("Player");
     #endif
     // pars
     bt.AddPar("UnityEngine.Vector3", "parT_moveTarget", "{kEpsilon=0;x=0;y=0;z=0;}", "");
     bt.AddPar("Player", "parIn_Self", "null", "");
     bt.AddPar("float", "parT_RotateAngle", "0", "");
     // children
     {
         DecoratorLoop_bt_Tank_WalkUtilCollision_node0 node0 = new DecoratorLoop_bt_Tank_WalkUtilCollision_node0();
         node0.SetClassNameString("DecoratorLoop");
         node0.SetId(0);
     #if !BEHAVIAC_RELEASE
         node0.SetAgentType("Player");
     #endif
         bt.AddChild(node0);
         {
             Selector node4 = new Selector();
             node4.SetClassNameString("Selector");
             node4.SetId(4);
     #if !BEHAVIAC_RELEASE
             node4.SetAgentType("Player");
     #endif
             node0.AddChild(node4);
             {
                 Action_bt_Tank_WalkUtilCollision_node1 node1 = new Action_bt_Tank_WalkUtilCollision_node1();
                 node1.SetClassNameString("Action");
                 node1.SetId(1);
     #if !BEHAVIAC_RELEASE
                 node1.SetAgentType("Player");
     #endif
                 node4.AddChild(node1);
                 node4.SetHasEvents(node4.HasEvents() | node1.HasEvents());
             }
             {
                 Sequence node9 = new Sequence();
                 node9.SetClassNameString("Sequence");
                 node9.SetId(9);
     #if !BEHAVIAC_RELEASE
                 node9.SetAgentType("Player");
     #endif
                 node4.AddChild(node9);
                 {
                     Assignment_bt_Tank_WalkUtilCollision_node6 node6 = new Assignment_bt_Tank_WalkUtilCollision_node6();
                     node6.SetClassNameString("Assignment");
                     node6.SetId(6);
     #if !BEHAVIAC_RELEASE
                     node6.SetAgentType("Player");
     #endif
                     node9.AddChild(node6);
                     node9.SetHasEvents(node9.HasEvents() | node6.HasEvents());
                 }
                 {
                     Sequence node2 = new Sequence();
                     node2.SetClassNameString("Sequence");
                     node2.SetId(2);
     #if !BEHAVIAC_RELEASE
                     node2.SetAgentType("Player");
     #endif
                     node9.AddChild(node2);
                     {
                         Condition_bt_Tank_WalkUtilCollision_node7 node7 = new Condition_bt_Tank_WalkUtilCollision_node7();
                         node7.SetClassNameString("Condition");
                         node7.SetId(7);
     #if !BEHAVIAC_RELEASE
                         node7.SetAgentType("Player");
     #endif
                         node2.AddChild(node7);
                         node2.SetHasEvents(node2.HasEvents() | node7.HasEvents());
                     }
                     {
                         Action_bt_Tank_WalkUtilCollision_node22 node22 = new Action_bt_Tank_WalkUtilCollision_node22();
                         node22.SetClassNameString("Action");
                         node22.SetId(22);
     #if !BEHAVIAC_RELEASE
                         node22.SetAgentType("Player");
     #endif
                         node2.AddChild(node22);
                         node2.SetHasEvents(node2.HasEvents() | node22.HasEvents());
                     }
                     node9.SetHasEvents(node9.HasEvents() | node2.HasEvents());
                 }
                 node4.SetHasEvents(node4.HasEvents() | node9.HasEvents());
             }
             node0.SetHasEvents(node0.HasEvents() | node4.HasEvents());
         }
         bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
     }
     return true;
 }
开发者ID:KeyleXiao,项目名称:behaviac,代码行数:95,代码来源:generated_behaviors.cs

示例3: 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");
     #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
         // attachments
         {
             Predicate_bt_node_test_predicate_selector_ut_5_attach1 attach1 = new Predicate_bt_node_test_predicate_selector_ut_5_attach1();
             attach1.SetClassNameString("Predicate");
             attach1.SetId(1);
     #if !BEHAVIAC_RELEASE
             attach1.SetAgentType("AgentNodeTest");
     #endif
             node0.Attach(attach1);
         }
         {
             Predicate_bt_node_test_predicate_selector_ut_5_attach3 attach3 = new Predicate_bt_node_test_predicate_selector_ut_5_attach3();
             attach3.SetClassNameString("Predicate");
             attach3.SetId(3);
     #if !BEHAVIAC_RELEASE
             attach3.SetAgentType("AgentNodeTest");
     #endif
             node0.Attach(attach3);
         }
         {
             Predicate_bt_node_test_predicate_selector_ut_5_attach6 attach6 = new Predicate_bt_node_test_predicate_selector_ut_5_attach6();
             attach6.SetClassNameString("Predicate");
             attach6.SetId(6);
     #if !BEHAVIAC_RELEASE
             attach6.SetAgentType("AgentNodeTest");
     #endif
             node0.Attach(attach6);
         }
         bt.AddChild(node0);
         {
             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();
             node2.SetClassNameString("Action");
             node2.SetId(2);
     #if !BEHAVIAC_RELEASE
             node2.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node2);
             node0.SetHasEvents(node0.HasEvents() | node2.HasEvents());
         }
         {
             Action_bt_node_test_predicate_selector_ut_5_node7 node7 = new Action_bt_node_test_predicate_selector_ut_5_node7();
             node7.SetClassNameString("Action");
             node7.SetId(7);
     #if !BEHAVIAC_RELEASE
             node7.SetAgentType("AgentNodeTest");
     #endif
             node0.AddChild(node7);
             node0.SetHasEvents(node0.HasEvents() | node7.HasEvents());
         }
         bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
     }
     return true;
 }
开发者ID:nusus,项目名称:behaviac,代码行数:89,代码来源:generated_behaviors.cs

示例4: build_behavior_tree

		public static bool build_behavior_tree(BehaviorTree bt)
		{
			bt.SetClassNameString("BehaviorTree");
			bt.SetId(-1);
			bt.SetName("node_test/query_ut_0");
			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
				// attachments
				{
					Precondition_bt_node_test_query_ut_0_attach1 attach1 = new Precondition_bt_node_test_query_ut_0_attach1();
					attach1.SetClassNameString("Precondition");
					attach1.SetId(1);
#if !BEHAVIAC_RELEASE
					attach1.SetAgentType("AgentNodeTest");
#endif
					node0.Attach(attach1, true, false, false);
				}
				{
					Effector_bt_node_test_query_ut_0_attach2 attach2 = new Effector_bt_node_test_query_ut_0_attach2();
					attach2.SetClassNameString("Effector");
					attach2.SetId(2);
#if !BEHAVIAC_RELEASE
					attach2.SetAgentType("AgentNodeTest");
#endif
					node0.Attach(attach2, false, true, false);
				}
				bt.AddChild(node0);
				{
					Query_bt_node_test_query_ut_0_node5 node5 = new Query_bt_node_test_query_ut_0_node5();
					node5.SetClassNameString("Query");
					node5.SetId(5);
#if !BEHAVIAC_RELEASE
					node5.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node5);
					node0.SetHasEvents(node0.HasEvents() | node5.HasEvents());
				}
				{
					Selector node6 = new Selector();
					node6.SetClassNameString("Selector");
					node6.SetId(6);
#if !BEHAVIAC_RELEASE
					node6.SetAgentType("AgentNodeTest");
#endif
					node0.AddChild(node6);
					{
						Query_bt_node_test_query_ut_0_node3 node3 = new Query_bt_node_test_query_ut_0_node3();
						node3.SetClassNameString("Query");
						node3.SetId(3);
#if !BEHAVIAC_RELEASE
						node3.SetAgentType("AgentNodeTest");
#endif
						node6.AddChild(node3);
						node6.SetHasEvents(node6.HasEvents() | node3.HasEvents());
					}
					{
						Query_bt_node_test_query_ut_0_node4 node4 = new Query_bt_node_test_query_ut_0_node4();
						node4.SetClassNameString("Query");
						node4.SetId(4);
#if !BEHAVIAC_RELEASE
						node4.SetAgentType("AgentNodeTest");
#endif
						node6.AddChild(node4);
						node6.SetHasEvents(node6.HasEvents() | node4.HasEvents());
					}
					node0.SetHasEvents(node0.HasEvents() | node6.HasEvents());
				}
				bt.SetHasEvents(bt.HasEvents() | node0.HasEvents());
			}
			return true;
		}
开发者ID:wuzhen,项目名称:behaviac,代码行数:81,代码来源:generated_behaviors.cs


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