diff options
Diffstat (limited to 'src/sprite.h')
-rw-r--r-- | src/sprite.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sprite.h b/src/sprite.h index 797b1b20..096dcf8a 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -26,6 +26,9 @@ class Graphics; class Image; +// Default frame display delay in milliseconds +const int DEFAULT_FRAME_DELAY = 75; + class Sprite { public: @@ -60,7 +63,7 @@ class Sprite virtual bool draw(Graphics* graphics, int posX, int posY) const = 0; /** - * Gets the width in pixels of the image + * Gets the width in pixels of the image */ virtual int getWidth() const = 0; @@ -115,6 +118,11 @@ class Sprite */ virtual size_t getFrameCount() const = 0; + /** + * Returns the duration of the current sprite animation in milliseconds. + */ + virtual int getDuration() const = 0; + protected: float mAlpha; /**< The alpha opacity used to draw */ }; |