Class ParticleEmitter
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
gameObjectGameObjectspriteBatchSpriteBatchprimitivesPrimitiveBatch
Properties
Acceleration
public Vector2 Acceleration { get; set; }
Property Value
AliveCount
public int AliveCount { get; }
Property Value
AngularVelocity
public float AngularVelocity { get; set; }
Property Value
Depth
public float Depth { get; set; }
Property Value
Direction
public float Direction { get; set; }
Property Value
EmissionRate
public float EmissionRate { get; set; }
Property Value
EndColor
public Color EndColor { get; set; }
Property Value
EndSize
public float EndSize { get; set; }
Property Value
IsPlaying
public bool IsPlaying { get; }
Property Value
Lifetime
public float Lifetime { get; set; }
Property Value
LifetimeVariation
public float LifetimeVariation { get; set; }
Property Value
MaxParticles
public int MaxParticles { get; set; }
Property Value
PlayOnStart
public bool PlayOnStart { get; set; }
Property Value
SimulationSpace
public ParticleSimulationSpace SimulationSpace { get; set; }
Property Value
Space
public CoordinateSpace Space { get; set; }
Property Value
Speed
public float Speed { get; set; }
Property Value
SpeedVariation
public float SpeedVariation { get; set; }
Property Value
Spread
public float Spread { get; set; }
Property Value
Sprite
public Sprite? Sprite { get; set; }
Property Value
StartColor
public Color StartColor { get; set; }
Property Value
StartRotation
public float StartRotation { get; set; }
Property Value
StartSize
public float StartSize { get; set; }
Property Value
Methods
Emit(int)
Emits an immediate burst, capped by MaxParticles.
public void Emit(int count)
Parameters
countint
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
seedint
Start()
public override void Start()
Stop(bool)
Stops continuous emission and optionally removes live particles.
public void Stop(bool clear = false)
Parameters
clearbool
Update(double)
public override void Update(double deltaTime)
Parameters
deltaTimedouble