| Package | org.flintparticles.common.counters |
| Class | public class Random |
| Inheritance | Random Object |
| Implements | Counter |
| Property | Defined By | ||
|---|---|---|---|
| complete : Boolean [read-only]
Indicates if the counter has emitted all its particles. | Random | ||
| maxRate : Number
The maximum number of particles to emit per second. | Random | ||
| minRate : Number
The minimum number of particles to emit per second. | Random | ||
| running : Boolean [read-only]
Indicates if the counter is currently emitting particles
| Random | ||
| Method | Defined By | ||
|---|---|---|---|
Random(minRate:Number = 0, maxRate:Number = 0)
The constructor creates a Random counter for use by an emitter. | Random | ||
resume():void
Resumes the emitter emitting particles after a stop
| Random | ||
startEmitter(emitter:Emitter):uint
Initilizes the counter. | Random | ||
stop():void
Stops the emitter from emitting particles
| Random | ||
updateEmitter(emitter:Emitter, time:Number):uint
Uses the time, rateMin and rateMax to calculate how many
particles the emitter should emit now. | Random | ||
| 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| maxRate | property |
maxRate:NumberThe maximum number of particles to emit per second.
public function get maxRate():Number public function set maxRate(value:Number):void| minRate | property |
minRate:NumberThe minimum number of particles to emit per second.
public function get minRate():Number public function set minRate(value:Number):void| running | property |
running:Boolean [read-only] Indicates if the counter is currently emitting particles
public function get running():Boolean| Random | () | Constructor |
public function Random(minRate:Number = 0, maxRate:Number = 0)The constructor creates a Random counter for use by an emitter. To add a Random counter to an emitter use the emitter's counter property.
ParametersminRate:Number (default = 0) — The minimum number of particles to emit per second.
| |
maxRate:Number (default = 0) — The maximum number of particles to emit per second.
|
See also
| resume | () | method |
public function resume():voidResumes the emitter emitting 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, 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