Packageorg.flintparticles.common.initializers
Interfacepublic interface Initializer extends Behaviour
Implementors InitializerBase, TweenToCurrentPosition, TweenToZone

The Initializer interface must be implemented by all particle initializers.

An Initializer is a class that is used to set properties of a particle when it is created. Initializers may, for example, set an initial velocity for a particle.

Initializers are directly associated with emitters and act on all particles created by that emitter. Initializers are applied to all particles created by an emitter by using the emitter's addInitializer method. Initializers are removed from the emitter by using the emitter's removeInitializer method.

The key method in the Initializer interface is the initiaize method. This is called for every particle and is where the initializer modifies the particle's properties.

See also

org.flintparticles.common.emitters.Emitter.addInitializer()
org.flintparticles.common.emitters.Emitter.removeInitializer()


Public Properties
 PropertyDefined By
 Inheritedpriority : int
The priority property is used to order the execution of behaviours.
Behaviour
Public Methods
 MethodDefined By
 Inherited
addedToEmitter(emitter:Emitter):void
The addedToEmitter method is called by the emitter when the Behaviour is added to it.
Behaviour
  
initialize(emitter:Emitter, particle:Particle):void
The initialize method is used by the emitter to apply the initialization to every particle.
Initializer
 Inherited
The removedFromEmitter method is called by the emitter when the Behaviour is removed from it.
Behaviour
Method Detail
initialize()method
public function initialize(emitter:Emitter, particle:Particle):void

The initialize method is used by the emitter to apply the initialization to every particle. It is the key feature of the initializers and is used to initialize the state of every particle. This method is called within the emitter's createParticle method for every particle and need not be called by the user.

Parameters

emitter:Emitter — The Emitter that created the particle.
 
particle:Particle — The particle to be initialized.