Swipe Scenes in AndEngine

只愿长相守 提交于 2019-12-11 08:38:59

问题


I'm making an Android Game using AndEngine. I'm making 5 levels in this puzzle game.
Now I want to implement level selection part.Where I'm planning to make 5 scenes and user can swipe them. But I don't know how to implement swipe with its effect in Andengine.
Looking for some help.


回答1:


Use the SurfaceGestureDetector in Andengine: https://code.google.com/p/andengine/source/browse/src/org/anddev/andengine/input/touch/detector/SurfaceGestureDetector.java?r=7d81e830fea0a8bfaac9cc185301e9823ea38092

Here is the andengine forum post that introduced the SurfaceGestureDetector, which was integrated into andengine. You can see how to use it in the code provided. http://www.andengine.org/forums/tutorials/scene-with-gesturedetector-t748.html



来源:https://stackoverflow.com/questions/17105657/swipe-scenes-in-andengine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!