Pregunta

Estoy usando AndEngine y tengo un sprite animado.

yo suelo scene.animate(duration,0,5,1) para animar el sprite de primer mosaico al último.

Me pregunto si de alguna manera podría hacer la animación hacia atrás para que comience desde el último mosaico hasta el primer mosaico.
Lo que necesito conseguir es 0,1,2,3,4,5,4,3,2,1,0 .

¿Fue útil?

Solución

Prueba esto,

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

Donde animar marcos de detalles

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 
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top