找回密码
 立即注册
在游戏开发中监听屏幕接触事情须要在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, you can intercept some information about the user's contact with the screen, such as the X and Y coordinates of the contact screen, the events of the contact screen, the contact press, the contact lift, the contact movement, the time of the contact screen, etc. Let's first look at the function prototype of onTouchEvent.)

[下载]14273907171.rar




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