AndEngine中如何检查触摸事件是精灵还是身体?
我对 AndEngine 还很陌生,我有一个问题。我想让它这样,如果我触摸精灵或身体,那么某些东西就会为我移除该精灵或身体。
I'm pretty new to AndEngine, and I have a question. I want to make it so if I touch on the sprite or the body then something will remove that sprite or body for me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用
必须在屏幕上注册触摸区域,因为
可能对您有帮助。
Use
have to register with screen for touch area as
May be it helpful to you..
试试这个,
用 IOnSceneTouchListener 实现你的类
,你可以在下面的实现方法中编写你的东西。
Try this,
Implement your class with
IOnSceneTouchListener
And you can write your stuff in the below implemented method.
应该是在这个大方向上的事情。
http://code.google. com/p/andengineexamples/source/browse/#hg%2Fsrc%2Forg%2Fanddev%2Fandengine%2Fexamples
有很多示例对于制造和引擎的人来说,至少将它们全部看一遍是个好主意。
It should be something in this general direction.
http://code.google.com/p/andengineexamples/source/browse/#hg%2Fsrc%2Forg%2Fanddev%2Fandengine%2Fexamples
Has a lot of examples of the person who made andengine, it's a good idea to atleast look at all of them once.