| Package | org.flintparticles.common.counters |
| Class | public class SineCounter |
| Inheritance | SineCounter Object |
| Implements | Counter |
| Property | Defined By | ||
|---|---|---|---|
| complete : Boolean [read-only]
Indicates if the counter has emitted all its particles. | SineCounter | ||
| period : Number
The period of the sine wave used, in seconds. | SineCounter | ||
| rateMax : Number
The number of particles emitted per second at the peak of
the sine wave. | SineCounter | ||
| rateMin : Number
The number of particles to emit per second at the bottom
of the sine wave. | SineCounter | ||
| running : Boolean [read-only]
Indicates if the counter is currently emitting particles
| SineCounter | ||
| Method | Defined By | ||
|---|---|---|---|
SineCounter(period:Number = 1, rateMax:Number = 0, rateMin:Number = 0)
The constructor creates a SineCounter counter for use by an emitter. | SineCounter | ||
resume():void
Resumes the emitting of particles after a stop
| SineCounter | ||
startEmitter(emitter:Emitter):uint
Initilizes the counter. | SineCounter | ||
stop():void
Stops the emitter from emitting particles
| SineCounter | ||
updateEmitter(emitter:Emitter, time:Number):uint
Uses the time, period, rateMin and rateMax to calculate how many
particles the emitter should emit now. | SineCounter | ||
| complete | property |
complete:Boolean [read-only] Indicates if the counter has emitted all its particles. For this counter this will always be false.
public function get complete():Boolean| period | property |
period:NumberThe period of the sine wave used, in seconds.
public function get period():Number public function set period(value:Number):void| rateMax | property |
rateMax:NumberThe number of particles emitted per second at the peak of the sine wave.
public function get rateMax():Number public function set rateMax(value:Number):void| rateMin | property |
rateMin:NumberThe number of particles to emit per second at the bottom of the sine wave.
public function get rateMin():Number public function set rateMin(value:Number):void| running | property |
running:Boolean [read-only] Indicates if the counter is currently emitting particles
public function get running():Boolean| SineCounter | () | Constructor |
public function SineCounter(period:Number = 1, rateMax:Number = 0, rateMin:Number = 0)The constructor creates a SineCounter counter for use by an emitter. To add a SineCounter counter to an emitter use the emitter's counter property.
Parametersperiod:Number (default = 1) — The number of particles emitted per second at the peak of
the sine wave.
| |
rateMax:Number (default = 0) — The number of particles to emit per second at the bottom
of the sine wave.
| |
rateMin:Number (default = 0) |
See also
| resume | () | method |
public function resume():voidResumes the emitting of particles after a stop
| startEmitter | () | method |
public function startEmitter(emitter:Emitter):uintInitilizes 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.
|
uint — 0
|
See also
| stop | () | method |
public function stop():voidStops the emitter from emitting particles
| updateEmitter | () | method |
public function updateEmitter(emitter:Emitter, time:Number):uintUses the time, period, 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.
|
uint — the number of particles the emitter should create.
|
See also