ParticleEmitter
Provides properties and functions to interact with a Particle Emitter in the world.
Properties
id
Gets the ID of the particle. This property is read-only.
lifetime
Gets lifetime of the particle (in seconds). To set new lifetime use restart(). This property is read-only.
remaining
Gets the time remaining for the particle to play (in seconds). This property is read-only.
position
Gets/sets the current position.
rotation
Gets/sets the current rotation (in degrees).
scale
Sets the current scale.
onDestroy
Assigns a function that will be called when the particle is destroyed or expired. This property is write-only.
Functions
restart(newLifetime)
Restarts the particle simulation.
Parameters
- newLifetime — (optional) Assigns a new lifetime for the particle. If not specified, uses preious lifetime.
destroy()
Destroys this particle.