我正在使用 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/