Class ParticleSpawner
Particle
- Inheritance
-
Particle
Spawner
- Derived
Properties
Delay
The minimum and maximum time the spawner should wait before starting to emit particles
Property Value
Duration
The minimum and maximum duration the spawner will be active once it starts spawning particles
Property Value
Enabled
Gets or sets a value indicating whether this Particle
Property Value
- bool
true
if enabled; otherwise,false
.
LoopCondition
Indicates if the spawner should loop, and if there is a delay every time it loops
Property Value
Methods
GetMaxParticlesPerSecond()
Get the maximum number of particles this spawner can emit in one second
Returns
- int
Peak particles per second
GetUpdatedState(float, ParticleEmitter)
Updates and gets the current internal state
Parameters
dt
floatDelta time in seconds since the last Get
Updated was calledState(float, Particle Emitter) emitter
ParticleEmitter Parent Particle
Emitter for this spawner
Returns
InvalidateRelations()
Invalidates relation of this emitter to any other emitters that might be referenced
MarkAsDirty()
Marking the spawner as dirty will notify the parent emitter that the maximum number of particles need to be recalculated
NotifyStateSwitch(SpawnerState)
Will be called when the state changes. Override if you need to set/reset variables based on state changes
Parameters
newState
SpawnerState The new state
SpawnNew(float, ParticleEmitter)
This method will be called form the emitter when it needs to poll how many particles to spawn (usually once per frame)
Parameters
dt
floatTime it has past since the last update (in seconds)
emitter
ParticleEmitter Parent emitter in which new particles should be emitter