TActorPool <T>
Index
Constructors
constructor
Type parameters
Parameters
actor: () => T
startingInstances: number
Returns default<T>
Properties
publicdead
Methods
publicacquire
Returns undefined | T
publicdestroy
Runs destroy all actors remaining in the pool. This will not destroy actors that have been acquired.
Once this method is called, the pool is no longer usable.
Returns void
publicrelease
Releases actor back to the pool, resets and removes it from the world
Parameters
actor: T
Returns void
Acquires an actor from the pool, and initializes a new one if necessary