Class DistanceSpawn
Spawn based by rate.
Inherited Members
Namespace: Evergine.Framework.Particles.Spawn
Assembly: Evergine.Framework.dll
Syntax
public class DistanceSpawn : BaseSpawn<SpawnDistanceDescription>
Constructors
DistanceSpawn(SpawnDistanceDescription)
Initializes a new instance of the DistanceSpawn class.
Declaration
public DistanceSpawn(SpawnDistanceDescription distanceDescription)
Parameters
Type | Name | Description |
---|---|---|
SpawnDistanceDescription | distanceDescription | The emit rate description. |
Properties
DistanceRate
Gets or sets the amount of particles that are spawned per unit of distance translated by the emitter.
Declaration
[RenderProperty(Tooltip = "The number of particles that will be emitted per distance unit in this frame.")]
public float DistanceRate { get; set; }
Property Value
Type | Description |
---|---|
float |
Duration
Gets or sets the duration of the emission in seconds. If value is 0, it doesn't stop emitting.
Declaration
[RenderProperty(Tooltip = "The time in seconds that the particle will be emitting.")]
public float Duration { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
Reset()
Resets the spawn behavior.
Declaration
public override void Reset()
Overrides
SpawnParticles(TimeSpan, EmitterSimulator)
Method that decides how many particles are being spawned.
Declaration
public override uint SpawnParticles(TimeSpan ellapsedTime, EmitterSimulator emitter)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | ellapsedTime | The ellapsed time. |
EmitterSimulator | emitter | The emitter simulator. |
Returns
Type | Description |
---|---|
uint | The number of new particles. |