| Package | idv.cjcat.stardust.common.initializers |
| Class | public class Initializer |
| Inheritance | Initializer StardustElement |
| Implements | InfoRecycler |
| Subclasses | Alpha, CollisionRadius, Color, CompositeInitializer, Initializer2D, Initializer3D, Life, Mask, Mass, Scale, SwitchInitializer |
An initializer can be associated with an emitter or a particle factory.
Default priority = 0;
| Property | Defined by | ||
|---|---|---|---|
| active : Boolean
Denotes if the initializer is active, true by default.
| Initializer | ||
![]() | name : 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 | ||
| Method | Defined by | ||
|---|---|---|---|
| Initializer | |||
|
getElementTypeXMLTag():XML
| Initializer | ||
![]() |
getRelatedObjects():Array
[Abstract Method] Returns the related objects of the element.
| StardustElement | |
![]() |
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 | ||
| active | property |
public var active:BooleanDenotes if the initializer is active, true by default.
| needsRecycle | property |
needsRecycle:Boolean [read-only]Implementation
public function get needsRecycle():Boolean
| onAdd | property |
onAdd:ISignal [read-only]Dispatched when the added to an emitter.
Signature: (emitter:Emitter, action:Initializer) Implementation public function get onAdd():ISignal
| onPriorityChange | property |
onPriorityChange:ISignal [read-only]Dispatched when the action's priority is changed.
Signature: (initializer:Initializer) Implementation public function get onPriorityChange():ISignal
| onRemove | property |
onRemove:ISignal [read-only]Dispatched when the removed from an emitter.
Signature: (emitter:Emitter, action:Initializer) Implementation public function get onRemove():ISignal
| priority | property |
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
| supports2D | property |
supports2D:Boolean [read-only]Whether this initializer supports 2D.
Implementation public function get supports2D():Boolean
| supports3D | property |
supports3D:Boolean [read-only]Whether this initializer supports 3D.
Implementation public function get supports3D():Boolean
| Initializer | () | constructor |
public function Initializer()
| 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.
Parametersparticle: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.
particle:Particle |
| toXML | () | method |
public override function toXML():XML
Returns
XML |