问题
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