Table of Contents

Class ParticleEmitter

Namespace
Axolotl2D.Particles
Assembly
Axolotl2D.dll

Emits, simulates, and draws lightweight 2D particles.

public sealed class ParticleEmitter : Component, IDisposable
Inheritance
ParticleEmitter
Implements
Inherited Members

Constructors

ParticleEmitter(GameObject, SpriteBatch, PrimitiveBatch)

Emits, simulates, and draws lightweight 2D particles.

public ParticleEmitter(GameObject gameObject, SpriteBatch spriteBatch, PrimitiveBatch primitives)

Parameters

gameObject GameObject
spriteBatch SpriteBatch
primitives PrimitiveBatch

Properties

Acceleration

public Vector2 Acceleration { get; set; }

Property Value

Vector2

AliveCount

public int AliveCount { get; }

Property Value

int

AngularVelocity

public float AngularVelocity { get; set; }

Property Value

float

Depth

public float Depth { get; set; }

Property Value

float

Direction

public float Direction { get; set; }

Property Value

float

EmissionRate

public float EmissionRate { get; set; }

Property Value

float

EndColor

public Color EndColor { get; set; }

Property Value

Color

EndSize

public float EndSize { get; set; }

Property Value

float

IsPlaying

public bool IsPlaying { get; }

Property Value

bool

Lifetime

public float Lifetime { get; set; }

Property Value

float

LifetimeVariation

public float LifetimeVariation { get; set; }

Property Value

float

MaxParticles

public int MaxParticles { get; set; }

Property Value

int

PlayOnStart

public bool PlayOnStart { get; set; }

Property Value

bool

SimulationSpace

public ParticleSimulationSpace SimulationSpace { get; set; }

Property Value

ParticleSimulationSpace

Space

public CoordinateSpace Space { get; set; }

Property Value

CoordinateSpace

Speed

public float Speed { get; set; }

Property Value

float

SpeedVariation

public float SpeedVariation { get; set; }

Property Value

float

Spread

public float Spread { get; set; }

Property Value

float

Sprite

public Sprite? Sprite { get; set; }

Property Value

Sprite

StartColor

public Color StartColor { get; set; }

Property Value

Color

StartRotation

public float StartRotation { get; set; }

Property Value

float

StartSize

public float StartSize { get; set; }

Property Value

float

Methods

Emit(int)

Emits an immediate burst, capped by MaxParticles.

public void Emit(int count)

Parameters

count int

OnDestroy()

public override void OnDestroy()

Play()

Starts continuous emission without clearing live particles.

public void Play()

Render()

public override void Render()

SetRandomSeed(int)

Resets the random sequence, useful for deterministic effects and tests.

public void SetRandomSeed(int seed)

Parameters

seed int

Start()

public override void Start()

Stop(bool)

Stops continuous emission and optionally removes live particles.

public void Stop(bool clear = false)

Parameters

clear bool

Update(double)

public override void Update(double deltaTime)

Parameters

deltaTime double