AndEngine 中的投影
我想以抛射运动移动 AndEngine
中的 Sprite
。
任何人都可以用一段代码帮助我解决这个问题吗?不幸的是,我没有看到有关 AndEngine
中投影的示例。
I want to move my Sprite
in AndEngine
in a projectile motion.
Can any one help me in this matter with a piece of code? Unfortunately I didn't see an example about projections in AndEngine
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我怀疑您正在寻找的是 UpdateModifier。
您希望您的精灵如何移动?您是否希望它找到到达目的地的路径,或者您只是想在屏幕上保留某些内容?您使用相机吗?所有这些都将决定您应该如何准确地让您的精灵移动。
这是有关 UpdateModifiers 的链接:
更新处理程序 - 使用他们的力量!
这是您正在寻找的吗?
What you're looking for is the UpdateModifier, I suspect.
How do you want your Sprite to move? Do you want it to find a path to the destination or are you just trying to keep something on the screen? Are you using a Camera? All of that will determine how exactly you should approach getting your Sprite to move.
This is a link for the tut about UpdateModifiers:
Update Handlers - Using their Power!
Is that what you were looking for?
对于弹丸移动,您可以使用物理处理程序,然后您可以操纵加速度和速度,使其像弹丸一样移动......
for a projectile move , you can use the physicshandler and then you can manipulate the acceleration and velocity to make it move like projectile...
基本上,您可以在精灵(或任何实体)上使用registerEntityMofidier: Andengine EntityModifierExample
示例:
Basically you can use registerEntityMofidier on a sprite (or on any Entity): Andengine EntityModifierExample
Example: