Class RateSpawn
Spawn based by rate.
Inherited Members
Namespace: Evergine.Framework.Particles.Spawn
Assembly: Evergine.Framework.dll
Syntax
public class RateSpawn : BaseSpawn<SpawnRateDescription>
Constructors
RateSpawn(SpawnRateDescription)
Initializes a new instance of the RateSpawn class.
Declaration
public RateSpawn(SpawnRateDescription rateDescription)
Parameters
Type | Name | Description |
---|---|---|
SpawnRateDescription | rateDescription | The emit rate description. |
Properties
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 |
Rate
Gets or sets the amount of particled that are spawned per second by the emitter.
Declaration
[RenderProperty(Tooltip = "The number of particles per second that will be emitted.")]
public float Rate { 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. |