我想实现类似于 super 马里奥吃蘑菇并长大时发生的效果。当 Sprite 与主 Sprite 碰撞时应该发生。我如何使用 AndEngine 轻松实现这一目标?
最佳答案
注册到您的“马里奥” Sprite SclaeAtModifier:
final Sprite entity= new Strite(x, y, textureRegion);
final ScaleAtModifier entityModifier = new ScaleAtModifier(10 /*Durarion*/, 1/*from*/, 2/*to*/, 0/*scale center X*/, 0 /*scale center Y*/);
// register modifier
entity.registerEntityModifier(entityModifier);
如果您不需要线性比例修改,请将特定的 IEaseFunction 添加到 ScaleAtModifier
关于android - super 马里奥在AndEngine中的成长效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9809365/