summaryrefslogtreecommitdiff
path: root/src/particle.h
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-09-25 00:15:44 +0000
committerIra Rice <irarice@gmail.com>2008-09-25 00:15:44 +0000
commit489a429bea6739dfa25503b9329bd9e33bffb856 (patch)
tree8112f6fd988fdc0610329b6bc14ee3f9d5801092 /src/particle.h
parent2dc8eadff1e67bb70b1772ecc19c9e1e2e40a5b4 (diff)
downloadmana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.gz
mana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.bz2
mana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.xz
mana-489a429bea6739dfa25503b9329bd9e33bffb856.zip
Merged the Tametomo branch into trunk.
Diffstat (limited to 'src/particle.h')
-rw-r--r--src/particle.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/particle.h b/src/particle.h
index d4a671c7..f281864d 100644
--- a/src/particle.h
+++ b/src/particle.h
@@ -18,7 +18,7 @@
* along with The Mana World; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: particle.h 4362 2008-06-24 12:29:33Z crush_tmw $
+ * $Id$
*/
#ifndef _PARTICLE_H
@@ -161,6 +161,9 @@ class Particle : public Sprite
{ mPos.x += x; mPos.y += y; mPos.z += z; }
void
+ moveChildren(Vector change);
+
+ void
moveBy (Vector change)
{ mPos += change; }
@@ -227,8 +230,8 @@ class Particle : public Sprite
* Sets the ammount of random vector changes
*/
void
- setRandomnes(int r)
- { mRandomnes = r; }
+ setRandomness(int r)
+ { mRandomness = r; }
/**
* Sets the ammount of velocity particles retain after
@@ -271,6 +274,12 @@ class Particle : public Sprite
{ return mAlive; }
/**
+ * Determines whether the particle and its children are all dead
+ */
+ bool isExtinct()
+ { return !isAlive() && mChildParticles.empty(); }
+
+ /**
* Manually marks the particle for deletion.
*/
void kill()
@@ -303,7 +312,7 @@ class Particle : public Sprite
// dynamic particle
Vector mVelocity; /**< Speed in pixels per game-tick. */
float mGravity; /**< Downward acceleration in pixels per game-tick. */
- int mRandomnes; /**< Ammount of random vector change */
+ int mRandomness; /**< Ammount of random vector change */
float mBounce; /**< How much the particle bounces off when hitting the ground */
bool mFollow; /**< is this particle moved when its parent particle moves? */