summaryrefslogtreecommitdiff
path: root/src/animatedsprite.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/animatedsprite.h')
-rw-r--r--src/animatedsprite.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/animatedsprite.h b/src/animatedsprite.h
index fc7bdbbc..cdf88ceb 100644
--- a/src/animatedsprite.h
+++ b/src/animatedsprite.h
@@ -95,6 +95,18 @@ class AnimatedSprite
*/
void setDirection(SpriteDirection direction);
+ /**
+ * Sets the alpha value of the animated sprite
+ */
+ void setAlpha(float alpha)
+ { mAlpha = alpha; }
+
+ /**
+ * Returns the current alpha opacity of the animated sprite.
+ */
+ virtual float getAlpha() const
+ { return mAlpha; }
+
private:
bool updateCurrentAnimation(unsigned int dt);
@@ -108,6 +120,7 @@ class AnimatedSprite
Action *mAction; /**< The currently active action. */
Animation *mAnimation; /**< The currently active animation. */
Frame *mFrame; /**< The currently active frame. */
+ float mAlpha; /**< The alpha opacity used to draw */
};
#endif