Sprite animation problem
- by hustlerinc
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.