Class DistanceSpawn
Spawn based on 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 distance description. |
Properties
DistanceRate
Gets or sets the number of particles spawned per unit of distance traveled 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 the 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 spawning behavior.
Declaration
public override void Reset()
Overrides
SpawnParticles(TimeSpan, EmitterSimulator)
Method that decides how many particles are spawned.
Declaration
public override uint SpawnParticles(TimeSpan ellapsedTime, EmitterSimulator emitter)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | ellapsedTime | |
EmitterSimulator | emitter | The emitter simulator. |
Returns
Type | Description |
---|---|
uint | The number of new particles. |