Android研究院之游戏开发触摸的响应方式(十三)文档
在游戏开发中监听屏幕接触事情须要在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.)
页:
[1]