Android AndEngine 向后动画

标签 android andengine

我正在使用 andengine 并且我有一个动画 Sprite 。

我使用scene.animate(duration,0,5,1)使 Sprite 从第一个图 block 到最后一个图 block 具有动画效果。

我想知道是否可以向后执行动画,以便它从最后一个图 block 开始到第一个图 block 。
我需要得到的是 0,1,2,3,4,5,4,3,2,1,0 .

最佳答案

试试这个,

sprite.animate(long[] pFrameDurations, int[] pFrames, int pLoopCount)

哪里 动画细节帧

Parameters:
    pFrameDurations: indicates the time delays between animations and must have the same length as pFrames.
    pFrames: indices of the frames to animate. // Here you specify your 0,1,2,3,4,5,4,3,2,1,0
    pLoopCount: indicates the no of times you want to repeat the animation 

关于Android AndEngine 向后动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8817146/

相关文章:

android - 使用 gmail 的电子邮件 Activity 崩溃,电子邮件地址在 hotmail 上显示为 NULL

java - 这是否意味着应用程序的内存使用量与应用程序的大小相同

android - 5.7"640x480 LCD 图形用户界面设计安卓

java - 我如何将代码移动到不同的类?

android - Android cordova 中的谷歌标签管理器

java - 更改场景时出现 ArrayIndexOutOfBoundsException

android - 引擎声音有时会起作用

java - 在 Android 中处理暂停/恢复和使用通知(使用 AndEngine)

android - 如何编译AndEngine? 1300 多个错误?

android - Andengine Sprite 奇怪的行为