| Package | org.flintparticles.twoD.actions |
| Class | public class ScaleAll |
| Inheritance | ScaleAll ActionBase Object |
Usually a particle's energy changes from 1 to 0 over its lifetime, but this can be altered via the easing function set within the age action.
This action should be used in conjunction with the Age action.
If you only want to adjust the image size of the particle, use the ScaleImage action.
See also
| Property | Defined By | ||
|---|---|---|---|
| endScale : Number
The scale factor for the particle when its energy
is 0 - usually at the end of its lifetime. | ScaleAll | ||
![]() | priority : int
Returns a default priority of 0 for this action. | ActionBase | |
| startScale : Number
The scale factor for the particle when its energy
is 1 - usually at the start of its lifetime. | ScaleAll | ||
| Method | Defined By | ||
|---|---|---|---|
ScaleAll(startScale:Number = 1, endScale:Number = 1)
The constructor creates a ScaleImage action for use by an emitter. | ScaleAll | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
[override]
Sets the scale of the particle based on the values defined
and the particle's energy level. | ScaleAll | ||
| endScale | property |
endScale:NumberThe scale factor for the particle when its energy is 0 - usually at the end of its lifetime. A scale of 1 is normal size.
public function get endScale():Number public function set endScale(value:Number):void| startScale | property |
startScale:NumberThe scale factor for the particle when its energy is 1 - usually at the start of its lifetime. A scale of 1 is normal size.
public function get startScale():Number public function set startScale(value:Number):void| ScaleAll | () | Constructor |
public function ScaleAll(startScale:Number = 1, endScale:Number = 1)The constructor creates a ScaleImage action for use by an emitter. To add a ScaleImage to all particles created by an emitter, use the emitter's addAction method.
ParametersstartScale:Number (default = 1) — The scale factor for the particle when its energy
is 1 - usually at the start of its lifetime. A scale of 1 is normal size.
| |
endScale:Number (default = 1) — The scale factor for the particle when its energy
is 0 - usually at the end of its lifetime. A scale of 1 is normal size.
|
See also
| update | () | method |
override public function update(emitter:Emitter, particle:Particle, time:Number):voidSets the scale of the particle based on the values defined and the particle's energy level.
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