diff options
Diffstat (limited to 'src/animation.h')
-rw-r--r-- | src/animation.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/animation.h b/src/animation.h index 60dcd287..605d8cb1 100644 --- a/src/animation.h +++ b/src/animation.h @@ -61,10 +61,25 @@ class Animation void reset(); + /** + * Appends a new animation at the end of the sequence + */ void addPhase(int image, unsigned int delay, int offsetX, int offsetY); + /** + * Appends an animation terminator that states that the animation + * should not loop + */ void + addTerminator(); + + /** + * Updates animation phase. + * true indicates a still running animation while false indicates a + * finished animation + */ + bool update(unsigned int time); int @@ -89,6 +104,7 @@ class Animation getLength(); protected: + static bool isTerminator(AnimationPhase); std::list<AnimationPhase> mAnimationPhases; std::list<AnimationPhase>::iterator iCurrentPhase; unsigned int mTime; |