DPSF by Daniel Schroeder

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

.NET API 168,448 bytes

 DPSFDefaultBaseParticleSystem<Particle, Vertex>

public abstract class DPSFDefaultBaseParticleSystem<Particle, Vertex> : DPSF<Particle, Vertex> where Particle : DPSFParticle where Vertex : struct, IDPSFParticleVertex
The Base Particle System class that the Default Particle System classes inherit from
public class CInitialProperties<Particle, Vertex> where Particle : DPSFParticle where Vertex : struct, IDPSFParticleVertex

Particle System Properties used to initialize a Particle's Properties.

NOTE: These are only applied to the Particle when the InitializeParticleUsingInitialProperties() function is set as the Particle Initialization Function.

A list of Magnets that should affect this Particle System's Particles.

NOTE: You must add a UpdateParticleXAccordingToMagnets function to the Particle Events in order for these Magnets to affect the Particles.

public CInitialProperties<Particle, Vertex> InitialProperties { get; }

Get the Settings used to specify the Initial Properties of a new Particle.

NOTE: These are only applied to the Particle when the InitializeParticleUsingInitialProperties() function is set as the Particle Initialization Function.

public string Name { get; set; }

The Name of the Particle System

public DPSFDefaultBaseParticleSystem(Game cGame)

Constructor

Returns the vector force that a Magnet should exert on a Particle

Function to Initialize a Default Particle with the Initial Settings

public void InitializeParticleUsingInitialProperties(DPSFParticle Particle, CInitialProperties<Particle, Vertex> cInitialProperties)

protected void UpdateParticleColorUsingLerp(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Linearly interpolates the Particle's Color between it's Start Color and End Color based on the Particle's Normalized Elapsed Time.

protected void UpdateParticlePositionAccordingToMagnets(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Calculates how much affect each of the Particle System's Magnets should have on this Particle and updates the Particle's Position accordingly.

protected void UpdateParticlePositionAndVelocityUsingAcceleration(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Updates a Particle's Velocity according to its Acceleration, and then the Position according to the new Velocity

protected void UpdateParticlePositionUsingExternalForce(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Applies the External Force to the Particle's Position

protected void UpdateParticlePositionUsingVelocity(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Update a Particle's Position according to its Velocity

protected void UpdateParticleSystemDisableEmitter(float fElapsedTimeInSeconds)

Disables the Emitter

protected void UpdateParticleSystemEmitParticlesAutomaticallyOff(float fElapsedTimeInSeconds)

Sets the Emitter to not Emit Particles Automatically

protected void UpdateParticleSystemEmitParticlesAutomaticallyOn(float fElapsedTimeInSeconds)

Sets the Emitter to Emit Particles Automatically

protected void UpdateParticleSystemEnableEmitter(float fElapsedTimeInSeconds)

Enables the Emitter

protected void UpdateParticleTransparencyToFadeInUsingLerp(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Linearly interpolates the Particle's Transparency to fade in based on the Particle's Normalized Elapsed Time.

If you are also updating the Particle Color using an EveryTime Event, be sure to set the ExecutionOrder of the event calling this function to be greater than that one, so that this function is called AFTER the color update function.

protected void UpdateParticleTransparencyToFadeOutUsingLerp(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Linearly interpolates the Particle's Transparency to fade out based on the Particle's Normalized Elapsed Time.

If you are also updating the Particle Color using an EveryTime Event, be sure to set the ExecutionOrder of the event calling this function to be greater than that one, so that this function is called AFTER the color update function.

protected void UpdateParticleTransparencyWithQuickFadeIn(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

protected void UpdateParticleTransparencyWithQuickFadeInAndQuickFadeOut(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Quickly fades the particle in when born and quickly fades it out as it approaches its death.

If you are also updating the Particle Color using an EveryTime Event, be sure to set the ExecutionOrder of the event calling this function to be greater than that one, so that this function is called AFTER the color update function.

protected void UpdateParticleTransparencyWithQuickFadeInAndSlowFadeOut(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Quickly fades the particle in when born and slowly fades it out as it gets closer to death.

If you are also updating the Particle Color using an EveryTime Event, be sure to set the ExecutionOrder of the event calling this function to be greater than that one, so that this function is called AFTER the color update function.

protected void UpdateParticleTransparencyWithQuickFadeOut(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

protected void UpdateParticleVelocityAccordingToMagnets(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Calculates how much affect each of the Particle System's Magnets should have on this Particle and updates the Particle's Velocity accordingly.

protected void UpdateParticleVelocityUsingAcceleration(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Update a Particle's Velocity according to its Acceleration

protected void UpdateParticleVelocityUsingExternalForce(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Applies the External Force to the Particle's Velocity

protected void UpdateParticleVelocityUsingFriction(DPSFDefaultBaseParticle cParticle, float fElapsedTimeInSeconds)

Applies the Particle's Friction to the its Velocity to slow the Particle down to a stop