Packageorg.flintparticles.common.counters
Classpublic class Steady
InheritanceSteady Inheritance Object
Implements Counter

The Steady counter causes the emitter to emit particles continuously at a steady rate. It can be used to simulate any continuous particle stream.



Public Properties
 PropertyDefined By
  complete : Boolean
[read-only] Indicates if the counter has emitted all its particles.
Steady
  rate : Number
The number of particles to emit per second.
Steady
  running : Boolean
[read-only] Indicates if the counter is currently emitting particles
Steady
Public Methods
 MethodDefined By
  
Steady(rate:Number = 0)
The constructor creates a Steady counter for use by an emitter.
Steady
  
resume():void
Resumes the emitter emitting particles after a stop
Steady
  
startEmitter(emitter:Emitter):uint
Initilizes the counter.
Steady
  
stop():void
Stops the emitter from emitting particles
Steady
  
updateEmitter(emitter:Emitter, time:Number):uint
Uses the time, rateMin and rateMax to calculate how many particles the emitter should emit now.
Steady
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
rateproperty 
rate:Number

The number of particles to emit per second.


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

Indicates if the counter is currently emitting particles


Implementation
    public function get running():Boolean
Constructor Detail
Steady()Constructor
public function Steady(rate:Number = 0)

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

Parameters
rate:Number (default = 0) — The number of particles to emit per second.

See also

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

Resumes the emitter emitting particles 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, rateMin and rateMax 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