| Package | org.flintparticles.common.initializers |
| Class | public class Lifetime |
| Inheritance | Lifetime InitializerBase Object |
| Property | Defined By | ||
|---|---|---|---|
| lifetime : Number
When reading, returns the average of minLifetime and maxLifetime. | Lifetime | ||
| maxLifetime : Number
The maximum lifetime for particles initialised by
this initializer. | Lifetime | ||
| minLifetime : Number
The minimum lifetime for particles initialised by
this initializer. | Lifetime | ||
![]() | priority : int
Returns a default priority of 0 for this action. | InitializerBase | |
| Method | Defined By | ||
|---|---|---|---|
Lifetime(minLifetime:Number, maxLifetime:Number)
The constructor creates a Lifetime initializer for use by
an emitter. | Lifetime | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | InitializerBase | |
[override]
This method does nothing. | Lifetime | ||
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | InitializerBase | |
| lifetime | property |
lifetime:NumberWhen reading, returns the average of minLifetime and maxLifetime. When writing this sets both maxLifetime and minLifetime to the same lifetime value.
public function get lifetime():Number public function set lifetime(value:Number):void| maxLifetime | property |
maxLifetime:NumberThe maximum lifetime for particles initialised by this initializer. Should be between 0 and 1.
public function get maxLifetime():Number public function set maxLifetime(value:Number):void| minLifetime | property |
minLifetime:NumberThe minimum lifetime for particles initialised by this initializer. Should be between 0 and 1.
public function get minLifetime():Number public function set minLifetime(value:Number):void| Lifetime | () | Constructor |
public function Lifetime(minLifetime:Number, maxLifetime:Number)The constructor creates a Lifetime initializer for use by an emitter. To add a Lifetime to all particles created by an emitter, use the emitter's addInitializer method.
The lifetime of particles initialized by this class will be a random value between the minimum and maximum values set. If no maximum value is set, the minimum value is used with no variation.
ParametersminLifetime:Number (default = NaN) — the minimum lifetime for particles
initialized by the instance.
| |
maxLifetime:Number (default = NaN) — the maximum lifetime for particles
initialized by the instance.
|
See also
| initialize | () | method |
override public function initialize(emitter:Emitter, particle:Particle):voidThis method does nothing. All derived classes override this method to initialize each particle created by the emitter.
Parameters
emitter:Emitter | |
particle:Particle |