Packageidv.cjcat.stardust.common.initializers
Classpublic class Initializer
InheritanceInitializer Inheritance StardustElement
ImplementsInfoRecycler
SubclassesAlpha, CollisionRadius, Color, CompositeInitializer, Initializer2D, Initializer3D, Life, Mask, Mass, Scale, SwitchInitializer

An initializer is used to alter just once (i.e. initialize) a particle's properties upon the particle's birth.

An initializer can be associated with an emitter or a particle factory.

Default priority = 0;



Public Properties
 PropertyDefined by
  active : Boolean
Denotes if the initializer is active, true by default.
Initializer
 Inheritedname : String
StardustElement
  needsRecycle : Boolean
[read-only]
Initializer
  onAdd : ISignal
[read-only] Dispatched when the added to an emitter.
Initializer
  onPriorityChange : ISignal
[read-only] Dispatched when the action's priority is changed.
Initializer
  onRemove : ISignal
[read-only] Dispatched when the removed from an emitter.
Initializer
  priority : int
Initializers will be sorted according to their priorities.
Initializer
  supports2D : Boolean
[read-only] Whether this initializer supports 2D.
Initializer
  supports3D : Boolean
[read-only] Whether this initializer supports 3D.
Initializer
Public Methods
 MethodDefined by
  
Initializer
  
Initializer
 Inherited
[Abstract Method] Returns the related objects of the element.
StardustElement
 Inherited
getXMLTag():XML
Returns the root tag of the XML representation.
StardustElement
  
getXMLTagName():String
Initializer
  
initialize(particle:Particle):void
[Template Method] This is the method that alters a particle's properties.
Initializer
  
parseXML(xml:XML, builder:XMLBuilder = null):void
Initializer
  
recycleInfo(particle:Particle):void
[Template Method] This method is called after a particle's death if the needsRecycle() method returns true.
Initializer
  
toXML():XML
Initializer
Property detail
activeproperty
public var active:Boolean

Denotes if the initializer is active, true by default.

needsRecycleproperty 
needsRecycle:Boolean  [read-only]Implementation
    public function get needsRecycle():Boolean
onAddproperty 
onAdd:ISignal  [read-only]

Dispatched when the added to an emitter.

Signature: (emitter:Emitter, action:Initializer)

Implementation
    public function get onAdd():ISignal
onPriorityChangeproperty 
onPriorityChange:ISignal  [read-only]

Dispatched when the action's priority is changed.

Signature: (initializer:Initializer)

Implementation
    public function get onPriorityChange():ISignal
onRemoveproperty 
onRemove:ISignal  [read-only]

Dispatched when the removed from an emitter.

Signature: (emitter:Emitter, action:Initializer)

Implementation
    public function get onRemove():ISignal
priorityproperty 
priority:int  [read-write]

Initializers will be sorted according to their priorities.

This is important, since some initializers may rely on other initializers to perform initialization beforehand. You can alter the priority of an initializer, but it is recommended that you use the default values.

Implementation
    public function get priority():int
    public function set priority(value:int):void
supports2Dproperty 
supports2D:Boolean  [read-only]

Whether this initializer supports 2D.

Implementation
    public function get supports2D():Boolean
supports3Dproperty 
supports3D:Boolean  [read-only]

Whether this initializer supports 3D.

Implementation
    public function get supports3D():Boolean
Constructor detail
Initializer()constructor
public function Initializer()
Method detail
getElementTypeXMLTag()method
public override function getElementTypeXMLTag():XML

Returns
XML
getXMLTagName()method 
public override function getXMLTagName():String

Returns
String
initialize()method 
public function initialize(particle:Particle):void

[Template Method] This is the method that alters a particle's properties.

Override this property to create custom initializers.

Parameters
particle:Particle
parseXML()method 
public override function parseXML(xml:XML, builder:XMLBuilder = null):voidParameters
xml:XML
 
builder:XMLBuilder (default = null)
recycleInfo()method 
public function recycleInfo(particle:Particle):void

[Template Method] This method is called after a particle's death if the needsRecycle() method returns true.

Parameters
particle:Particle
toXML()method 
public override function toXML():XML

Returns
XML