Packageorg.flintparticles.twoD.initializers
Classpublic class Velocity
InheritanceVelocity Inheritance InitializerBase Inheritance Object

The ColorInit Initializer sets the velocity of the particle. It is usually combined with the Move action to move the particle using this velocity.

The initial velocity is defined using a zone from the org.flintparticles.twoD.zones package. The use of zones enables diverse ranges of velocities. For example, to use a specific velocity, a Point zone can be used. To use a varied speed in a specific direction, a LineZone zone can be used. For a fixed speed in a varied direction, a Disc or DiscSector zone with identical inner and outer radius can be used. A Disc or DiscSector with different inner and outer radius produces a range of speeds in a range of directions.

Default MXML Propertyzone



Public Properties
 PropertyDefined By
 Inheritedpriority : int
Returns a default priority of 0 for this action.
InitializerBase
  zone : Zone2D
The zone.
Velocity
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
InitializerBase
Public Methods
 MethodDefined By
  
Velocity(zone:Zone2D = null)
The constructor creates a Velocity initializer for use by an emitter.
Velocity
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
InitializerBase
  
initialize(emitter:Emitter, particle:Particle):void
[override] This method does nothing.
Velocity
 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
Velocity()Constructor
public function Velocity(zone:Zone2D = null)

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

Parameters
zone:Zone2D (default = null) — The zone to use for creating the velocity.

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