Packageorg.flintparticles.common.initializers
Classpublic class ColorsInit
InheritanceColorsInit Inheritance InitializerBase

The ColorsInit initializer sets the color of the particle. It selects one of multiple colors, using optional weighting values to produce an uneven distribution for the colors.



Public Methods
 MethodDefined by
  
ColorsInit(colors:Array, weights:Array = null)
The constructor creates a ColorsInit initializer for use by an emitter.
ColorsInit
  
addColor(color:uint, weight:Number = 1):void
ColorsInit
 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.
ColorsInit
  
removeColor(color:uint):void
ColorsInit
 Inherited
This method does nothing.
InitializerBase
Constructor detail
ColorsInit()constructor
public function ColorsInit(colors:Array, weights:Array = null)

The constructor creates a ColorsInit initializer for use by an emitter. To add a ColorsInit to all particles created by an emitter, use the emitter's addInitializer method.

Parameters
colors:Array — An array containing the Colors to use for each particle created by the emitter, as 32bit ARGB values.
 
weights:Array (default = null) — The weighting to apply to each color. If no weighting values are passed, the colors are all assigned a weighting of 1.

See also

Method detail
addColor()method
public function addColor(color:uint, weight:Number = 1):voidParameters
color:uint
 
weight:Number (default = 1)
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
removeColor()method 
public function removeColor(color:uint):voidParameters
color:uint