eonarheim / java-game-engine

Provides a simply easy to use 2D rpg game engine that is portable to anything that can run java.
2 stars 0 forks source link

Extend Animation Class with different Play modes #1

Closed eonarheim closed 12 years ago

eonarheim commented 12 years ago

Currently the animation class will loop forever in a "Cycle" like fashion. We would like to have more versatility in our animations supporting multiple different play modes like: Cycle, Ping-Pong, and Once. This will be useful when constructing animations from sprite sheets so you need not reorganize your images to play specific animations.

Cycle: Currently the only way animations play, when the animation reaches the last image it loops around to the beginning. Ping-Pong: This describes an animation which plays until the last frame then plays backwards to the first frame and so on. Once: This describes an animation which plays only once. Useful for explosions or other effects.

Possibly could be implemented with an enum of some kind.