| Package | org.flintparticles.common.actions |
| Class | public class ColorChange |
| Inheritance | ColorChange 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.
See also
| Property | Defined By | ||
|---|---|---|---|
| endColor : uint
The color of the particle when its energy is zero. | ColorChange | ||
![]() | priority : int
Returns a default priority of 0 for this action. | ActionBase | |
| startColor : uint
The color of the particle when its energy is 1. | ColorChange | ||
| Method | Defined By | ||
|---|---|---|---|
ColorChange(startColor:uint = 0xFFFFFF, endColor:uint = 0xFFFFFF)
The constructor creates a ColorChange action for use by an emitter. | ColorChange | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | ActionBase | |
[override]
Sets the color of the particle based on the colors and the particle's
energy level. | ColorChange | ||
| endColor | property |
endColor:uintThe color of the particle when its energy is zero.
public function get endColor():uint public function set endColor(value:uint):void| startColor | property |
startColor:uintThe color of the particle when its energy is 1.
public function get startColor():uint public function set startColor(value:uint):void| ColorChange | () | Constructor |
public function ColorChange(startColor:uint = 0xFFFFFF, endColor:uint = 0xFFFFFF)The constructor creates a ColorChange action for use by an emitter. To add a ColorChange to all particles created by an emitter, use the emitter's addAction method.
ParametersstartColor:uint (default = 0xFFFFFF) — The 32bit (ARGB) color of the particle when its
energy is 1 - usually at the beginning of its life.
| |
endColor:uint (default = 0xFFFFFF) — The 32bit (ARGB) color of the particle when its
energy is 0 - usually at the end of its life.
|
See also
| update | () | method |
override public function update(emitter:Emitter, particle:Particle, time:Number):voidSets the color of the particle based on the colors 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