| Package | org.flintparticles.common.counters |
| Interface | public interface Counter |
| Implementors | Blast, KeyDownCounter, PerformanceAdjusted, Pulse, Random, SineCounter, Steady, TimePeriod, ZeroCounter |
A counter is a class that tells an emitter how many particles to emit at any time. The two methods control the rate of emission of particles when the emitter starts and every frame thereafter.
A counter is directly associated with an emitter. A counter is set for an emitter by assigning it to the emitter's counter property.
See also
| Property | Defined By | ||
|---|---|---|---|
| complete : Boolean [read-only]
Indicates if the counter has emitted all its particles
| Counter | ||
| running : Boolean [read-only]
Indicates if the counter is currently emitting particles
| Counter | ||
| Method | Defined By | ||
|---|---|---|---|
resume():void
Resumes the counter after a stop
| Counter | ||
startEmitter(emitter:Emitter):uint
The startEmitter method is called when the emitter starts. | Counter | ||
stop():void
Stops the counter instructing the emitter to emit particles
| Counter | ||
updateEmitter(emitter:Emitter, time:Number):uint
The updateEmitter method is called every frame after the
emitter has started. | Counter | ||
| complete | property |
complete:Boolean [read-only] Indicates if the counter has emitted all its particles
public function get complete():Boolean| running | property |
running:Boolean [read-only] Indicates if the counter is currently emitting particles
public function get running():Boolean| resume | () | method |
public function resume():voidResumes the counter after a stop
| startEmitter | () | method |
public function startEmitter(emitter:Emitter):uintThe startEmitter method is called when the emitter 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 — The number of particles the emitter should emit when it starts.
|
| stop | () | method |
public function stop():voidStops the counter instructing the emitter to emit particles
| updateEmitter | () | method |
public function updateEmitter(emitter:Emitter, time:Number):uintThe updateEmitter method is called every frame after the emitter has started.
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 emit
at this time.
|