| Package | org.flintparticles.twoD.initializers |
| Class | public class Velocity |
| Inheritance | Velocity InitializerBase Object |
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 | |
[override]
This method does nothing. | Velocity | ||
![]() | removedFromEmitter(emitter:Emitter):void
This method does nothing. | InitializerBase | |
| zone | property |
zone:Zone2DThe zone.
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 |
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 |