| Package | com.desuade.partigen.pools |
| Class | public class SweepPool |
| Inheritance | SweepPool NullPool Pool Object |
| Language Version : | ActionScript 3 |
| Since : | 07.22.2009 |
| Runtime Versions : | AIR 1.0, Flash Player 9.0.0 |
| Property | Defined By | ||
|---|---|---|---|
| interval : int [read-only]
The current interval in ms for each sweep. | SweepPool | ||
![]() | length : int [read-only]
Returns the total amount of particles in the pool. | Pool | |
![]() | particleClass : Class [read-only]
Gets the class of particle the pool creates. | Pool | |
![]() | particles : Dictionary [read-only]
A Dictionary object of all the current "living" particles. | Pool | |
| Method | Defined By | ||
|---|---|---|---|
SweepPool(particleClass:Class, interval:int = 4000)
Creates a SweepPool to store particle objects. | SweepPool | ||
![]() | [override]
Adds a new particle to the Pool. | NullPool | |
![]() | purge():void
This does nothing for Sweep and Null pools. | Pool | |
removeParticle(particle:*):void [override]
Removes the specified particle from the Pool.
If you're trying to remove a particle through custom code, it is recommended to simply call particle.kill() than to work directly with the pool.
| SweepPool | ||
![]() | setClass(particleClass:Class):void
This sets the particleClass to the new class and deals with reseting the internal pool. | Pool | |
startSweeper(interval:int):void
This starts the sweeper to periodically remove objects from the pool. | SweepPool | ||
stopSweeper():void
This stops the sweeper. | SweepPool | ||
sweep(o:Object):void
This deletes the objects that have been marked for removal by the pool all at once. | SweepPool | ||
| interval | property |
interval:int [read-only] The current interval in ms for each sweep.
public function get interval():int| SweepPool | () | Constructor |
public function SweepPool(particleClass:Class, interval:int = 4000)Creates a SweepPool to store particle objects. This can be used with multiple emitters.
ParametersparticleClass:Class — The class of particle the pool will create.
| |
interval:int (default = 4000) — The interval in ms to run a sweep.
|
| removeParticle | () | method |
override public function removeParticle(particle:*):void
Removes the specified particle from the Pool.
If you're trying to remove a particle through custom code, it is recommended to simply call particle.kill() than to work directly with the pool.
Parameters
particle:* — The particle to remove.
|
| startSweeper | () | method |
public function startSweeper(interval:int):voidThis starts the sweeper to periodically remove objects from the pool.
Parameters
interval:int — The interval in ms to run a sweep.
|
| stopSweeper | () | method |
public function stopSweeper():voidThis stops the sweeper.
| sweep | () | method |
public function sweep(o:Object):voidThis deletes the objects that have been marked for removal by the pool all at once.
Parameters
o:Object |