| Package | org.flintparticles.common.actions |
| Class | public class Age |
| Inheritance | Age ActionBase Object |
The aging process need not be linear. This action can use a function that modifies the aging process, to ease in or out or to alter the aging in other ways.
When the particle's lifetime is over, this action marks it as dead.
When adjusting the energy this action can use any of the easing functions in the org.flintparticles.common.energy package along with any custom easing functions that have the same interface.
See also
| Property | Defined By | ||
|---|---|---|---|
| easing : Function
The easing function used to modify the energy over the
lifetime of the particle. | Age | ||
![]() | priority : int
Returns a default priority of 0 for this action. | ActionBase | |
| Method | Defined By | ||
|---|---|---|---|
Age(easing:Function = null)
The constructor creates an Age action for use by an emitter. | Age | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
[override]
Sets the energy of the particle based on its age and the easing function. | Age | ||
| easing | property |
easing:FunctionThe easing function used to modify the energy over the lifetime of the particle.
public function get easing():Function public function set easing(value:Function):void| Age | () | Constructor |
public function Age(easing:Function = null)The constructor creates an Age action for use by an emitter. To add an Age to all particles created by an emitter, use the emitter's addAction method.
Parameterseasing:Function (default = null) — an easing function to use to modify the
energy curve over the lifetime of the particle. The default
null produces a linear response with no easing.
|
See also
| update | () | method |
override public function update(emitter:Emitter, particle:Particle, time:Number):voidSets the energy of the particle based on its age and the easing function.
This method is called by the emitter and need not be called by the user
Parameters
emitter:Emitter — The Emitter that created the particle.
| |
particle:Particle — The particle to be updated.
| |
time:Number — The duration of the frame - used for time based updates.
|
See also