找回密码
 立即注册
接触theonTouchEvent屏幕 | Unity3D 2022-11-09 65 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
在游戏开发中监听屏幕接触事件须要在View中重写父类onTouchEvent方法,在重写的方法中阻拦用户接触屏幕的一些信息,比方接触屏幕的X、Y坐标接触屏幕发作的事件接触按下接触抬起接触移动,接触屏幕发作的时刻等等,我们先看看onTouchEvent的函数原型。

(To monitor screen contact events in game development, you need to rewrite the parent onTouchEvent method in View. In the rewritten method, users are prevented from touching some information on the screen, such as the X and Y coordinates of the screen, the event of the screen attack, the contact press, the contact lift, the contact move, the time of the screen attack, etc. Let's first look at the function prototype of onTouchEvent.)

[下载]14261550695.rar




上一篇:Android研究院之游戏开发处理按键的响应(十二)源码
下一篇:Android研究院之游戏开发触摸轨迹曲线(十四)源码