Packageorg.flintparticles.twoD.actions
Classpublic class Jet
InheritanceJet Inheritance ActionBase Inheritance Object

The Jet Action applies an acceleration to particles only if they are in the specified zone.



Public Properties
 PropertyDefined By
  invertZone : Boolean
If false (the default) the acceleration is applied only to particles inside the zone.
Jet
 Inheritedpriority : 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
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
ActionBase
Public Methods
 MethodDefined 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
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
ActionBase
 Inherited
This method does nothing.
ActionBase
  
update(emitter:Emitter, particle:Particle, time:Number):void
[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
Property Detail
invertZoneproperty
invertZone:Boolean

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
xproperty 
x:Number

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
yproperty 
y:Number

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
zoneproperty 
zone:Zone2D

The zone in which to apply the acceleration.


Implementation
    public function get zone():Zone2D
    public function set zone(value:Zone2D):void
Constructor Detail
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.

Parameters
accelerationX: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

Method Detail
update()method
override public function update(emitter:Emitter, particle:Particle, time:Number):void

Checks 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