Packageorg.flintparticles.twoD.initializers
Classpublic class Position
InheritancePosition Inheritance InitializerBase Inheritance Object

The Position Initializer sets the initial location of the particle.

The class uses zones to place the particle. A zone defines a region in relation to the emitter and the particle is placed at a random point within that region. For precise placement, the Point zone defines a single point at which all particles will be placed. Various zones (and the Zones interface for use when implementing custom zones) are defined in the org.flintparticles.twoD.zones package.

Default MXML Propertyzone



Public Properties
 PropertyDefined By
 Inheritedpriority : int
Returns a default priority of 0 for this action.
InitializerBase
  zone : Zone2D
The zone.
Position
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
InitializerBase
Public Methods
 MethodDefined By
  
Position(zone:Zone2D = null)
The constructor creates a Position initializer for use by an emitter.
Position
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
InitializerBase
  
initialize(emitter:Emitter, particle:Particle):void
[override] This method does nothing.
Position
 Inherited
This method does nothing.
InitializerBase
Property Detail
zoneproperty
zone:Zone2D

The zone.


Implementation
    public function get zone():Zone2D
    public function set zone(value:Zone2D):void
Constructor Detail
Position()Constructor
public function Position(zone:Zone2D = null)

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

Parameters
zone:Zone2D (default = null) — The zone to place all particles in.

See also

Method Detail
initialize()method
override public 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