DPSF Particle Class

Top  Previous  Next

All particle classes created must inherit, either directly or indirectly from the DPSFParticle class.  The DPSFParticle class specifies a few properties that will be common to all particles.  Specifically these are:

 

- a Visible boolean indicating if the particle should be drawn or not

- a Lifetime float indicating how long the particle should exist for before being removed from the particle system

- an ElapsedTime float indicating how long the particle has existed for so far.

- a NormalizedElapsedTime float which specifies how far the particle is through its lifespan on a scale from 0.0 (birth) to 1.0 (death)

- LastElapsedTime and LastNormalizedElapsedTime floats indicating what the particle's ElapsedTime and NormalizedElapsedTime values were at the last update.

 

If you want a particle to live forever and not die, set its Lifetime to 0.0.  In this case, the Normalized elapsed time variables will report the same values as the non-normalized variables.