Package com.badlogic.gdx.graphics.g2d
Class ParticleEffectPool
- java.lang.Object
-
- com.badlogic.gdx.utils.Pool<ParticleEffectPool.PooledEffect>
-
- com.badlogic.gdx.graphics.g2d.ParticleEffectPool
-
public class ParticleEffectPool extends Pool<ParticleEffectPool.PooledEffect>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ParticleEffectPool.PooledEffect
-
Nested classes/interfaces inherited from class com.badlogic.gdx.utils.Pool
Pool.Poolable
-
-
Constructor Summary
Constructors Constructor Description ParticleEffectPool(ParticleEffect effect, int initialCapacity, int max)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
free(ParticleEffectPool.PooledEffect effect)
Puts the specified object in the pool, making it eligible to be returned byPool.obtain()
.protected ParticleEffectPool.PooledEffect
newObject()
-
-
-
Constructor Detail
-
ParticleEffectPool
public ParticleEffectPool(ParticleEffect effect, int initialCapacity, int max)
-
-
Method Detail
-
newObject
protected ParticleEffectPool.PooledEffect newObject()
- Specified by:
newObject
in classPool<ParticleEffectPool.PooledEffect>
-
free
public void free(ParticleEffectPool.PooledEffect effect)
Description copied from class:Pool
Puts the specified object in the pool, making it eligible to be returned byPool.obtain()
. If the pool already containsPool.max
free objects, the specified object isdiscarded
, it is not reset and not added to the pool.The pool does not check if an object is already freed, so the same object must not be freed multiple times.
- Overrides:
free
in classPool<ParticleEffectPool.PooledEffect>
-
-