Android AndEngine Animer arrière
Question
J'utilise AndEngine et j'ai un Sprite animé.
J'utilise scene.animate(duration,0,5,1)
pour animer le sprite de la première tuile à la dernière.
Je me demande si je pouvais faire quelque sorte l'animation en arrière afin qu'il commence à partir de la dernière tuile à la première tuile.
Ce que je dois faire est 0,1,2,3,4,5,4,3,2,1,0
.
La solution
Essayez ceci,
sprite.animate(long[] pFrameDurations, int[] pFrames, int pLoopCount)
où cadres de spécificités Animer
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
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow