| Package | org.flintparticles.common.initializers |
| Class | public class ImageInitializerBase |
| Inheritance | ImageInitializerBase InitializerBase Object |
| Subclasses | ImageClass, ImageClasses |
| Property | Defined By | ||
|---|---|---|---|
![]() | priority : int
Returns a default priority of 0 for this action. | InitializerBase | |
| usePool : Boolean
Whether the images should be pooled for reuse when a particle dies
| ImageInitializerBase | ||
| Property | Defined By | ||
|---|---|---|---|
| _emitters : Array | ImageInitializerBase | ||
| _pool : Array | ImageInitializerBase | ||
![]() | _priority : int = 0 | InitializerBase | |
| _usePool : Boolean | ImageInitializerBase | ||
| Method | Defined By | ||
|---|---|---|---|
ImageInitializerBase(usePool:Boolean = false, fillPool:uint = 0)
The constructor is usually called by the constructor of the class that extends this. | ImageInitializerBase | ||
addedToEmitter(emitter:Emitter):void [override]
When added to an emitter, the initializer will start listening for dead particles
so their images may be pooled. | ImageInitializerBase | ||
clearPool():void
Clears the image pool, forcing all particles to be created anew. | ImageInitializerBase | ||
createImage():Object
The method to create an image for a particle. | ImageInitializerBase | ||
fillPool(count:uint):void
Fills the pool with a given number of particles. | ImageInitializerBase | ||
[override]
This method does nothing. | ImageInitializerBase | ||
removedFromEmitter(emitter:Emitter):void [override]
When removed from an emitter, the initializer will stop listening for dead particles from that emitter. | ImageInitializerBase | ||
| _emitters | property |
protected var _emitters:Array| _pool | property |
protected var _pool:Array| _usePool | property |
protected var _usePool:Boolean| usePool | property |
usePool:BooleanWhether the images should be pooled for reuse when a particle dies
public function get usePool():Boolean public function set usePool(value:Boolean):void| ImageInitializerBase | () | Constructor |
public function ImageInitializerBase(usePool:Boolean = false, fillPool:uint = 0)The constructor is usually called by the constructor of the class that extends this.
ParametersusePool:Boolean (default = false) — Whether the images should be pooled for reuse when a particle dies
| |
fillPool:uint (default = 0) — How many images to create immediately for reuse as particles need them
|
See also
| addedToEmitter | () | method |
override public function addedToEmitter(emitter:Emitter):voidWhen added to an emitter, the initializer will start listening for dead particles so their images may be pooled. The initializer will only pool images that it created.
Parameters
emitter:Emitter |
| clearPool | () | method |
public function clearPool():voidClears the image pool, forcing all particles to be created anew.
| createImage | () | method |
public function createImage():ObjectThe method to create an image for a particle. This should be overridden in the class that extends this one.
ReturnsObject |
| fillPool | () | method |
public function fillPool(count:uint):voidFills the pool with a given number of particles.
Parameters
count:uint — The number of particles to create.
|
| initialize | () | method |
override public function initialize(emitter:Emitter, particle:Particle):voidThis method does nothing. All derived classes override this method to initialize each particle created by the emitter.
Parameters
emitter:Emitter | |
particle:Particle |
| removedFromEmitter | () | method |
override public function removedFromEmitter(emitter:Emitter):voidWhen removed from an emitter, the initializer will stop listening for dead particles from that emitter.
Parameters
emitter:Emitter |