根据设备不同选择不同触摸响应对象
2013-04-09 16:40
357 查看
function Update () { var clickDetected : boolean; var touchPosition : Vector3; if (Application.platform == RuntimePlatform.IPhonePlayer) isTouchDevice = true; else isTouchDevice = false; // Detect click and calculate touch position if (isTouchDevice) { clickDetected = (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began); touchPosition = Input.GetTouch(0).position; } else { clickDetected = (Input.GetMouseButtonDown(0)); touchPosition = Input.mousePosition; }
相关文章推荐
- 对方法传入对象,根据对象的Type选择不同的方法;typeof() 和 GetType()的区别
- web知识-根据用户的设备自动选择质量不同的图片。
- 根据设备的分辨率选择不同的图片
- 根据不同的窗口尺寸来选择不同的样式
- iOS UIResponder 触摸事件 运动事件 响应对象
- 不同设备,直通线与交叉线的选择
- 根据不同访问设备跳转到PC页面或手机页面
- 利用R文件根据按钮id来识别点击某一个按钮时的触摸响应
- 冒泡排序是选择排序的退化版,再就是一组数中求几个最小的数选择什么方法要根据不同情况进行分类
- 不同设备,直通线与交叉线的选择
- XAF 字段级权限扩展-根据对象选择属性
- 项目中在Android.mk文件中根据项目名称选择不同的AndroidManifest.xml文件 && 如何使用系统设定的日期显示格式
- JAVA如何根据jsp页面时间(开始到结束时间)和checkbox选择不同的多少出现不同的曲线
- 碎步一:根据用户喜好选择不同背景图(背景选择器)
- table+webusercontrol实现左边treeview,右边根据节点选择不同加载不同页面
- 根据个人的性格不同我认为要有选择的看待这个建议,写在这里也是给自己一个警示
- window下让git根据服务器自动选择不同的ssh key
- Spring mvc ContentNegotiatingViewResolver 根据路径后缀,选择不同视图
- maven 之 根据不同环境,选择不同的配置文件。
- 搭建Windows系统下php开发环境有很多种方式,比如LAMP的配置、php IDE和调试工具的选择等等。根据每个人喜好不同有很多配置方式。这里主要介绍的是利用XAMPP集成安装和配置apache、