DPSF by Daniel Schroeder

<PackageReference Include="DPSF" Version="2.5.0" />

.NET API 168,448 bytes

 DPSFParticle

public class DPSFParticle
Class used to hold a Particle's properties. This class only holds a Particle's Lifetime information, but may be inherited from in order to specify additional Particle properties, such as position, size, color, etc.
public float ElapsedTime { get; set; }

Get / Set how much Time has Elapsed since this Particle was born.

NOTE: Setting this to be greater than or equal to Lifetime will cause the Particle to become InActive and be removed from the Particle System (if Lifetime is greater than zero).

NOTE: Setting this also sets the Last Elapsed Time to the given value.

public float LastElapsedTime { get; }

Get the Elapsed Time of the Particle at the previous frame

public float LastNormalizedElapsedTime { get; }

Get the Normalized Elapsed Time of the Particle at the previous frame

public float Lifetime { get; set; }

Get / Set the Lifetime of the Particle (How long it should live for).

NOTE: Setting this to zero will make the Particle live forever.

NOTE: Negative Lifetimes are reset to zero.

public float NormalizedElapsedTime { get; set; }

Get / Set the Normalized Elapsed Time (0.0 - 1.0) of this Particle (How far through its life it is).

NOTE: Setting this to be greater than or equal to 1.0 will cause the Particle to become InActive and be removed from the Particle System (if Lifetime is greater than zero).

NOTE: If the Particle has a Lifetime of zero (is set to live forever), Setting this has no effect, and Getting this will always return zero.

public bool Visible { get; set; }

Get / Set if the Particle should be Visible (i.e. be drawn) or not

public DPSFParticle()

Constructor to initialize Particle variables

public virtual void CopyFrom(DPSFParticle ParticleToCopy)

Deep copy the ParticleToCopy's values into this Particle

public bool IsActive()

Function to tell if a Particle is still Active (alive) or not

public virtual void Reset()

Resets the Particles variables to default values

public void UpdateElapsedTimeVariables(float fElapsedTimeInSeconds)

Function to update the Elapsed Time associated variables of the Particle. This is done automatically by DPSF when the particle system's Update() function is called, so this function does not need to be manually called by the user.