Packageorg.flintparticles.common.counters
Classpublic class Pulse
InheritancePulse Inheritance Object
Implements Counter

The Pulse counter causes the emitter to emit groups of particles at a regular interval.



Public Properties
 PropertyDefined By
  complete : Boolean
[read-only] Indicates if the counter has emitted all its particles.
Pulse
  period : Number
The time, in seconds, between each pulse.
Pulse
  quantity : uint
The number of particles to emit at each pulse.
Pulse
  running : Boolean
[read-only] Indicates if the counter is currently emitting particles
Pulse
Public Methods
 MethodDefined By
  
Pulse(period:Number = 1, quantity:uint = 0)
The constructor creates a Pulse counter for use by an emitter.
Pulse
  
resume():void
Resumes the emitter after a stop
Pulse
  
startEmitter(emitter:Emitter):uint
Initilizes the counter.
Pulse
  
stop():void
Stops the emitter from emitting particles
Pulse
  
updateEmitter(emitter:Emitter, time:Number):uint
Uses the time, period and quantity to calculate how many particles the emitter should emit now.
Pulse
Property Detail
completeproperty
complete:Boolean  [read-only]

Indicates if the counter has emitted all its particles. For this counter this will always be false.


Implementation
    public function get complete():Boolean
periodproperty 
period:Number

The time, in seconds, between each pulse.


Implementation
    public function get period():Number
    public function set period(value:Number):void
quantityproperty 
quantity:uint

The number of particles to emit at each pulse.


Implementation
    public function get quantity():uint
    public function set quantity(value:uint):void
runningproperty 
running:Boolean  [read-only]

Indicates if the counter is currently emitting particles


Implementation
    public function get running():Boolean
Constructor Detail
Pulse()Constructor
public function Pulse(period:Number = 1, quantity:uint = 0)

The constructor creates a Pulse counter for use by an emitter. To add a Pulse counter to an emitter use the emitter's counter property.

Parameters
period:Number (default = 1) — The time, in seconds, between each pulse.
 
quantity:uint (default = 0) — The number of particles to emit at each pulse.

See also

org.flintparticles.common.emitter.Emitter.counter
Method Detail
resume()method
public function resume():void

Resumes the emitter after a stop

startEmitter()method 
public function startEmitter(emitter:Emitter):uint

Initilizes the counter. Returns 0 to indicate that the emitter should emit no particles when it starts.

This method is called within the emitter's start method and need not be called by the user.

Parameters

emitter:Emitter — The emitter.

Returns
uint — 0

See also

stop()method 
public function stop():void

Stops the emitter from emitting particles

updateEmitter()method 
public function updateEmitter(emitter:Emitter, time:Number):uint

Uses the time, period and quantity to calculate how many particles the emitter should emit now.

This method is called within the emitter's update loop and need not be called by the user.

Parameters

emitter:Emitter — The emitter.
 
time:Number — The time, in seconds, since the previous call to this method.

Returns
uint — the number of particles the emitter should create.

See also