(二十)unity4.6得知Ugui中国文献-------另外-InputModules
大家好。我是太阳广东。 转载请注明出处:http://write.blog.csdn.net/postedit/38922399
更全的内容请看我的游戏蛮牛地址:http://www.unitymanual.com/forum.php?mod=guide&view=my
完整的教程下载地址:http://www.unitymanual.com/thread-26665-1-1.html
5.1 InputModules
输入的模块是在哪里配置和定制事件系统的主要逻辑。有两个InputModules被提供,一个设计为Standalone独立的和一个用于Touch触摸屏输入。每一个模块接收和发送事件,正如你期望在给定的配置。
假设你想要自己定义的事件处理在您的应用程序中。能够编写自己定义 InputModules。
5.1.1 Touch Input Module
input module被设计为使用触摸的基础设备上。这可处理的输入并发送事件会在触摸设备上预期的那样。
该模块的流程例如以下所看到的:
♥For
each touch event关于每一个触摸事件
♦If it is a new press假设它是新的按下
•Send PointerEnter event (sent to everyobject up the hierarchy that can handle it)
•Send PointerPress event
•Cache the drag handler (first element in the hierarchy that canhandle it)
•Send BeginDrag event to the drag handler
•Set the ‘Pressed’ object as Selected in the event system
(
发送 PointerEnter事件(发送到每一个对象能够在hierarchy中处理)
发送 PointerPress事件
缓存的拖动处理程序(在hierarchy中,能够处理它的第一个元素)
BeginDrag事件发送到拖动处理程序
在event system中设置‘Pressed’ 对象为Selected
)
♦If this is a continuing press假设它是持续的按下
•Send DragEvent to the cached drag handler
•Handle PointerEnter and PointerExit events if touch moves betweenobjects
(
处理移动
发送DragEvent到缓存的拖动处理程序
假设对象之间触摸移动,处理 PointerEnter和
PointerExit的事件
)
♦If this is a release假设它是释放按下
•Send PointerUp event to the object that received the PointerPress
•If the current hover object is the same as the PointerPress objectsend a PointerClick event
•Send a Drop event if there was a drag handler cached
•Send a EndDrag event to teh cached drag handler
(
发送PointerUp事件到接受PointerPress的对象
假设当前悬停对象是同样的 PointerPress对象发送一个
PointerClick事件
假设拖动处理程序被缓存。发送Drop事件
EndDrag事件发送到缓存的拖动处理程序
)
5.1.2 Standalone Input Module
input module用于鼠标、键盘和控制器。该模块被配置查看
InputManager,发送事件是基于输入Input manager管理器是何种状态。
本模块使用:
♥Vertical
/ Horizontal axis for keyboard and controller navigation
♥Submit
/ Cancel button for sending submit and cancel events
♥Has
a timeout between events to only allow a maximum number of events a second.
(
垂直 /水平轴,用于键盘和控制器的导航
提交 /取消button发送提交和取消事件
仅同意最大每秒事件数之间。
)
该模块的流程例如以下所看到的:
♥Send
a Move event to the selected object if a valid axis from the input manager is entered
♥Send
a submit or cancel event to the selected object if a submit or cancel button is pressed
♥Process
Mouse input
(
假设从input manager中输入了有效的轴,将发送Move移动事件发送到选定的对象上
假设按下一个提交或取消button,发送一个提交或取消事件到所选对象上
处理鼠标输入
)
♦If
it is a new press 假设它是新的按下
•Send PointerEnter event (sent to every object up the hierarchy that can handle it)
•Send PointerPress event
•Cache the drag handler (first element in the hierarchy that can handle it)
•Send BeginDrag event to the drag handler
•Set the ‘Pressed’ object as Selected in the event system
(
发送 PointerEnter事件(发送到每一个对象能够在hierarchy中处理)
发送 PointerPress事件
缓存的拖动处理程序(在hierarchy中。能够处理它的第一个元素)
BeginDrag事件发送到拖动处理程序
在event system中设置‘Pressed’ 对象为Selected
)
♦If
this is a continuing press假设它是持续的按下
•Process movment
•Send DragEvent to the cached drag handler
•Handle PointerEnter and PointerExit events if touch moves between objects
(
处理移动
发送DragEvent到缓存的拖动处理程序
假设对象之间触摸移动,处理 PointerEnter和
PointerExit的事件
)
♦If
this is a release假设它是释放按下
•Send PointerUp event to the object that received the PointerPress
•If the current hover object is the same as the PointerPress object send a PointerClick event
•Send a Drop event if there was a drag handler cached
•Send a EndDrag event to teh cached drag handler
(
发送PointerUp事件到接受PointerPress的对象
假设当前悬停对象是同样的 PointerPress对象发送一个
PointerClick事件
假设拖动处理程序被缓存,发送Drop事件
EndDrag事件发送到缓存的拖动处理程序
)
♥Process
scroll wheel events进程滚动滚轮事件
版权声明:本文博主原创文章,博客,未经同意不得转载。
离 游戏开发实验室_孙广东
(二十)unity4.6得知Ugui中国文献-------另外-InputModules的更多相关文章
- (十一年)unity4.6得知Ugui中国文献-------参考-UGUI Visual Components
大家好,我是太阳广东. 转载请注明出处:http://write.blog.csdn.net/postedit/38922399 更全的内容请看我的游戏蛮牛地址:http://www.unity ...
- (二十二)unity4.6学习Ugui中文文档-------交互-Eventsystem & Binding
大家好,我是孙广东. 转载请注明出处:http://write.blog.csdn.net/postedit/38922399 更全的内容请看我的游戏蛮牛地址:http://www.unityma ...
- 【转】(二)unity4.6Ugui中文教程文档-------概要-UGUI Canvas
原创至上,移步请戳:(二)unity4.6Ugui中文教程文档-------概要-UGUI Canvas UI系统允许您快速.直观地创建用户界面(Ui).这是Unity的新 UI 系统的主要功能介绍. ...
- Android进阶(二十八)上下文菜单ContextMenu使用案例
上下文菜单ContextMenu使用案例 前言 回顾之前的应用程序,发现之前创建的选项菜单无法显示了.按照正常逻辑来说,左图中在"商品信息"一栏中应该存在选项菜单,用户可进行分享等 ...
- 智课雅思词汇---二十二、-al即是名词性后缀又是形容词后缀
智课雅思词汇---二十二.-al即是名词性后缀又是形容词后缀 一.总结 一句话总结: 后缀:-al ②[名词后缀] 1.构成抽象名词,表示行为.状况.事情 refusal 拒绝 proposal 提议 ...
- 使用Minikube部署本地Kubernetes集群(二十八)
前言 使用Minikube部署本地k8s集群相对比较简单,非常推荐将其用于本地k8s开发环境,唯一麻烦点的仅仅是网络问题. 在本篇教程中,我们使用了国内的镜像来完成本地k8s集群的搭建.如果搭建过程中 ...
- 深度学习(二十六)Network In Network学习笔记
深度学习(二十六)Network In Network学习笔记 Network In Network学习笔记 原文地址:http://blog.csdn.net/hjimce/article/deta ...
- 小小知识点(二十六)关于5G发展的28个核心问题,来自华为内部的深度解读
本文来自微信公众号“腾讯深网”(ID:qqshenwang),作者 马关夏.36氪经授权转载. 一.5G先进性与行业应用 1.5G到底是什么?和4G比有什么不一样? 从国际电信联盟(ITU)的定义来看 ...
- NLP(二十二)利用ALBERT实现文本二分类
在文章NLP(二十)利用BERT实现文本二分类中,笔者介绍了如何使用BERT来实现文本二分类功能,以判别是否属于出访类事件为例子.但是呢,利用BERT在做模型预测的时候存在预测时间较长的问题.因此 ...
随机推荐
- 记录break和continue的区别
我对break 和 continue 还是有点搞不清除,今天在看<Thinking in Java>,看到这个,学习了一下. break的作用是跳出这个循环(如果这个break ...
- JavaScript 中的事件对象(读书笔记思维导图)
在触发 DOM 上的某个事件时,会产生一个事件对象 event,这个对象中包含着所有与事件有关的信息.包括导致事件的元素.事件的类型以及其他与特定事件相关的信息.例如,鼠标操作导致的事件对象中,会包含 ...
- 使用HtmlAgilityPack批量抓取网页数据
原文:使用HtmlAgilityPack批量抓取网页数据 相关软件点击下载登录的处理.因为有些网页数据需要登陆后才能提取.这里要使用ieHTTPHeaders来提取登录时的提交信息.抓取网页 Htm ...
- 关于JAVA Project.waitfor()死锁问题
在正常情况下我们可以用Project.waitfor()的返回值是否等于0的方法来判断java调用外部程序是Pass或者是Fail. 但是这个方法往往会被因进程堵塞而导致程序发生死锁,无法再继续执行外 ...
- Linux SSH常用总结(转)
一.连接到远程主机 格式: ssh name@remoteserver 例如: ssh ickes@192.168.27.211 二.连接到远程主机指定的端口 格式: ssh name@remotes ...
- ubuntu/linux mint 创建proc文件的三种方法(四)
在做内核驱动开发的时候,能够使用/proc下的文件,获取对应的信息,以便调试. 大多数/proc下的文件是仅仅读的,但为了演示样例的完整性,都提供了写方法. 方法一:使用create_proc_ent ...
- ipsec vpn私网数据大量掉包问题
周四出现了一个很奇葩的问题,所有的站点的VPN通信都是正常的,唯独郑州节点和中心节点的私网数据长ping掉包量达到20%左右,在中心节点ping郑州节点公网IP没有发现掉包问题,故障排除如下: 1.测 ...
- ACdream 1148(莫比乌斯反演+分块)
传送门:GCD SUM 题意:给出N,M执行如下程序:long long ans = 0,ansx = 0,ansy = 0;for(int i = 1; i <= N; i ++) fo ...
- cocos2.2.3 HelloCpp TestCpp android 环境搭建 编译
cygwin make PATH->E:\cygwin\bin JAVA_HOME->C:\Program Files\Java\jdk1.8.0_05 Eclipse->Windo ...
- 部署、收回和删除解决方式----STSADM和PowerShell
部署.收回和删除解决方式----STSADM和PowerShell 由于近期总是要部署wsp解决方式,所以常常要用到命令行或者PowerShell.所以有必要将命令集中放在这里.在部署 ...