TaskTriggerType 根据事件类型来确定节点
来源:互联网 发布:淘宝网管理团队 编辑:程序博客网 时间:2024/06/07 06:39
namespace BehaviorDesigner.Samples{ public enum TaskTriggerType { Idle, Jump, SphereCollision, PlaySound } [TaskCategory("MiniGauntlet")] [TaskDescription("A composite task that will choose its child based on the latest collision/trigger event.")] public class TaskTriggerSelector : Composite { // Start with the idle task private int nextTaskIndex = 0; public override int CurrentChildIndex() { // The next task index will be 0 unless a collision or trigger event has occurred return nextTaskIndex; } public override void OnChildExecuted(TaskStatus childStatus) { // Set the next task index back to 0 immediately after the child has executed to prevent a non-idle task from running multiple tiles nextTaskIndex = 0; } // OnTriggerEnter is called when the agent runs into a trigger that specifies what task to run text public override void OnTriggerEnter(Collider other) { TriggerType triggerType = null; if ((triggerType = other.GetComponent<TriggerType>()) != null) { nextTaskIndex = (int)triggerType.triggerType; } } // OnCollisionEnter is called when a sphere collides with the player public override void OnCollisionEnter(Collision collision) { nextTaskIndex = (int)TaskTriggerType.SphereCollision; } }}
0 0
- TaskTriggerType 根据事件类型来确定节点
- xml SelectSingleNode 根据属性来选择节点
- 根据属性来选择xml节点
- 根据事件类型做出反应
- 根据当前时间来确定上个月的最后一天
- 根据 字体来确定UILabel的行高和宽度
- 根据作用域来确定恰当的变量引用
- C# 根据月份来确定每月的最大天数
- 根据刻录后光盘的名称来确定光盘版本
- 根据文字字数来动态确定Label宽高
- C语言基础 根据输入值来确定数组大小
- 根据文件头的编码来确定文件格式。
- dom4j根据xml节点name值来遍历节点数据
- 使用运行是类型标识来确定对象的类型
- jsTree 点击节点事件及根据 ID 获取节点方法
- jstree使用【三】根据节点类型更换节点图标
- 根据位置来触发单击事件
- 根据病毒名称来判断病毒类型
- Spring 解决编码问题-CharacterEncodingFilter
- 忽略时间,以'帧'为概念的重力系统(通过updatePosition来更新位置代替MoveTo)
- UML之用例图
- 权限项目总结(四) shiro 授权
- HTML5 video 跨浏览器兼容的方法
- TaskTriggerType 根据事件类型来确定节点
- spring 的 AOP详解
- 生成表记录的SQL语句
- 测试博文测试博文测试博文
- 2015腾讯微博登陆解密基于httpclient抓包模拟登陆
- hadoop2.5.2HA高可靠性集群搭建(zookeeper3.4.6+hbase0.98.11)
- 测试博文测试博文测试博文
- 用户体验可以从那些方面去着手
- w3school 对 base 标签的解释