| Package | org.flintparticles.common.initializers |
| Class | public class ColorInit |
| Inheritance | ColorInit InitializerBase Object |
| Property | Defined By | ||
|---|---|---|---|
| color : uint
When reading, returns the average of minColor and maxColor. | ColorInit | ||
| maxColor : uint
The maximum color value for particles initialised by
this initializer. | ColorInit | ||
| minColor : uint
The minimum color value for particles initialised by
this initializer. | ColorInit | ||
![]() | priority : int
Returns a default priority of 0 for this action. | InitializerBase | |
| Method | Defined By | ||
|---|---|---|---|
ColorInit(color1:uint = 0xFFFFFF, color2:uint = 0xFFFFFF)
The constructor creates a ColorInit initializer for use by
an emitter. | ColorInit | ||
![]() | addedToEmitter(emitter:Emitter):void
This method does nothing. | InitializerBase | |
[override]
This method does nothing. | ColorInit | ||
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | InitializerBase | |
| color | property |
color:uintWhen reading, returns the average of minColor and maxColor. When writing this sets both maxColor and minColor to the same color.
public function get color():uint public function set color(value:uint):void| maxColor | property |
maxColor:uintThe maximum color value for particles initialised by this initializer. Should be between 0 and 1.
public function get maxColor():uint public function set maxColor(value:uint):void| minColor | property |
minColor:uintThe minimum color value for particles initialised by this initializer. Should be between 0 and 1.
public function get minColor():uint public function set minColor(value:uint):void| ColorInit | () | Constructor |
public function ColorInit(color1:uint = 0xFFFFFF, color2:uint = 0xFFFFFF)The constructor creates a ColorInit initializer for use by an emitter. To add a ColorInit to all particles created by an emitter, use the emitter's addInitializer method.
The color of particles initialized by this class will be a random value between the two values pased to the constructor. For a fixed value, pass the same color in for both parameters.
Parameterscolor1:uint (default = 0xFFFFFF) — the 32bit (ARGB) color at one end of the color range to use.
| |
color2:uint (default = 0xFFFFFF) — the 32bit (ARGB) color at the other end of the color range to use.
|
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 |