summaryrefslogtreecommitdiff
path: root/src/particle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/particle.h')
-rw-r--r--src/particle.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/particle.h b/src/particle.h
index 4f92b5cd..c3e7692c 100644
--- a/src/particle.h
+++ b/src/particle.h
@@ -171,6 +171,12 @@ class Particle : public Sprite
{ mAlpha = alpha; }
/**
+ * Returns the current alpha opacity of the particle.
+ */
+ virtual float getAlpha() const
+ { return mAlpha; }
+
+ /**
* Sets the sprite iterator of the particle on the current map to make
* it easier to remove the particle from the map when it is destroyed.
*/
@@ -258,6 +264,10 @@ class Particle : public Sprite
void disableAutoDelete()
{ mAutoDelete = false; }
+ /** We consider particles (at least for now) to be one layer-sprites */
+ virtual int getNumberOfLayers() const
+ { return 1; }
+
protected:
bool mAlive; /**< Is the particle supposed to be drawn and updated?*/
Vector mPos; /**< Position in pixels relative to map. */