| Package | org.flintparticles.twoD.initializers |
| Class | public class Velocity |
| Inheritance | Velocity InitializerBase |
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
| Property | Defined by | ||
|---|---|---|---|
![]() | priority : int
Returns a default priority of 0 for this action.
| InitializerBase | |
| zone : Zone2D
The zone.
| Velocity | ||
| Method | Defined by | ||
|---|---|---|---|
|
The constructor creates a Velocity initializer for use by
an emitter.
| Velocity | ||
![]() |
addedToEmitter(emitter:Emitter):void
This method does nothing.
| InitializerBase | |
|
This method does nothing.
| Velocity | ||
![]() |
removedFromEmitter(emitter:Emitter):void
This method does nothing.
| InitializerBase | |
| zone | property |
zone:Zone2D [read-write]The zone.
Implementation public function get zone():Zone2D
public function set zone(value:Zone2D):void
| 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.
Parameterszone:Zone2D (default = null) — The zone to use for creating the velocity.
|
See also
| initialize | () | method |
public override function initialize(emitter:Emitter, particle:Particle):voidThis method does nothing. All derived classes override this method to initialize each particle created by the emitter.
Parametersemitter:Emitter |
|
particle:Particle |