Sprite animation problem
Posted
by
hustlerinc
on Game Development
See other posts from Game Development
or by hustlerinc
Published on 2012-07-28T03:52:53Z
Indexed on
2014/06/04
9:40 UTC
Read the original article
Hit count: 210
I have this sprite I have to animate. The sprite is 7 images total but animation is 10 frames (2 positions are repeated).
The order I want to go through the frames is like this:
3 -> 4 -> 5 -> 6 -> 4 -> 3 -> 2 -> 1 -> 0 -> 2.
My problem is how can I skip 1 frame once I reach the end of each direction? The reason I want to skip is to save me from creating duplicate positions in the spritesheet.
I'm doing this in Javascript.
© Game Development or respective owner