| Package | org.flintparticles.twoD.actions |
| Class | public class Jet |
| Inheritance | Jet ActionBase |
| Property | Defined by | ||
|---|---|---|---|
| invertZone : Boolean
If false (the default) the acceleration is applied
only to particles inside the zone.
| Jet | ||
![]() | priority : int
Returns a default priority of 0 for this action.
| ActionBase | |
| x : Number
The x component of the acceleration to apply, in
pixels per second per second.
| Jet | ||
| y : Number
The y component of the acceleration to apply, in
pixels per second per second.
| Jet | ||
| zone : Zone2D
The zone in which to apply the acceleration.
| Jet | ||
| Method | Defined by | ||
|---|---|---|---|
|
Jet(accelerationX:Number = 0, accelerationY:Number = 0, zone:Zone2D = null, invertZone:Boolean = false)
The constructor creates a Jet action for use by an emitter.
| Jet | ||
![]() |
addedToEmitter(emitter:Emitter):void
This method does nothing.
| ActionBase | |
![]() |
removedFromEmitter(emitter:Emitter):void
This method does nothing.
| ActionBase | |
|
Checks if the particle is inside the zone and, if so, applies the
acceleration to the particle for the period of time indicated.
| Jet | ||
| invertZone | property |
invertZone:Boolean [read-write]If false (the default) the acceleration is applied only to particles inside the zone. If true the acceleration is applied only to particles outside the zone.
Implementation public function get invertZone():Boolean
public function set invertZone(value:Boolean):void
| x | property |
x:Number [read-write]The x component of the acceleration to apply, in pixels per second per second.
Implementation public function get x():Number
public function set x(value:Number):void
| y | property |
y:Number [read-write]The y component of the acceleration to apply, in pixels per second per second.
Implementation public function get y():Number
public function set y(value:Number):void
| zone | property |
zone:Zone2D [read-write]The zone in which to apply the acceleration.
Implementation public function get zone():Zone2D
public function set zone(value:Zone2D):void
| Jet | () | constructor |
public function Jet(accelerationX:Number = 0, accelerationY:Number = 0, zone:Zone2D = null, invertZone:Boolean = false)The constructor creates a Jet action for use by an emitter. To add a Jet to all particles created by an emitter, use the emitter's addAction method.
ParametersaccelerationX:Number (default = 0) — The x component of the acceleration to apply, in
pixels per second per second.
|
|
accelerationY:Number (default = 0) — The y component of the acceleration to apply, in
pixels per second per second.
|
|
zone:Zone2D (default = null) — The zone in which to apply the acceleration.
|
|
invertZone:Boolean (default = false) — If false (the default) the acceleration is applied
only to particles inside the zone. If true the acceleration is applied
only to particles outside the zone.
|
See also
| update | () | method |
public override function update(emitter:Emitter, particle:Particle, time:Number):voidChecks if the particle is inside the zone and, if so, applies the acceleration to the particle for the period of time indicated.
This method is called by the emitter and need not be called by the user.
Parametersemitter:Emitter — The Emitter that created the particle.
|
|
particle:Particle — The particle to be updated.
|
|
time:Number — The duration of the frame - used for time based updates.
|
See also