Packageorg.flintparticles.common.initializers
Classpublic class ColorInit
InheritanceColorInit Inheritance InitializerBase

The ColorInit Initializer sets the color of the particle.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined by
  
ColorInit(color1:uint, color2:uint)
The constructor creates a ColorInit initializer for use by an emitter.
ColorInit
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
InitializerBase
 Inherited
Returns a default priority of 0 for this action.
InitializerBase
  
initialize(emitter:Emitter, particle:Particle):void
This method does nothing.
ColorInit
 Inherited
This method does nothing.
InitializerBase
Property detail
colorproperty
color:uint  [read-write]

When reading, returns the average of minColor and maxColor. When writing this sets both maxColor and minColor to the same color.

Implementation
    public function get color():uint
    public function set color(value:uint):void
maxColorproperty 
maxColor:uint  [read-write]

The maximum color value for particles initialised by this initializer. Should be between 0 and 1.

Implementation
    public function get maxColor():uint
    public function set maxColor(value:uint):void
minColorproperty 
minColor:uint  [read-write]

The minimum color value for particles initialised by this initializer. Should be between 0 and 1.

Implementation
    public function get minColor():uint
    public function set minColor(value:uint):void
Constructor detail
ColorInit()constructor
public function ColorInit(color1:uint, color2:uint)

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.

Parameters
color1:uint — the 32bit (ARGB) color at one end of the color range to use.
 
color2:uint — the 32bit (ARGB) color at the other end of the color range to use.

See also

Method detail
initialize()method
public override function initialize(emitter:Emitter, particle:Particle):void

This method does nothing. All derived classes override this method to initialize each particle created by the emitter.

Parameters
emitter:Emitter
 
particle:Particle