| Package | org.flintparticles.twoD.actions |
| Class | public class Jet |
| Inheritance | Jet ActionBase Object |
| 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 | |
[override]
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:BooleanIf 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.
public function get invertZone():Boolean public function set invertZone(value:Boolean):void| x | property |
x:NumberThe x component of the acceleration to apply, in pixels per second per second.
public function get x():Number public function set x(value:Number):void| y | property |
y:NumberThe y component of the acceleration to apply, in pixels per second per second.
public function get y():Number public function set y(value:Number):void| zone | property |
zone:Zone2DThe zone in which to apply the acceleration.
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 |
override public 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.
Parameters
emitter: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