public final class ParticleSystem extends Object implements RenderableProvider
Modifier and Type | Method and Description |
---|---|
void |
add(ParticleBatch<?> batch) |
void |
add(ParticleEffect effect) |
void |
begin()
Must be called one time per frame before any particle effect drawing operation will occur.
|
void |
draw()
Draws all the particle effects.
|
void |
end()
Must be called one time per frame at the end of all drawing operations.
|
static ParticleSystem |
get() |
Array<ParticleBatch<?>> |
getBatches() |
void |
getRenderables(Array<Renderable> renderables,
Pool<Renderable> pool)
Returns
Renderable instances. |
void |
remove(ParticleEffect effect) |
void |
removeAll()
Removes all the effects added to the system
|
void |
update()
Updates the simulation of all effects
|
void |
updateAndDraw() |
public static ParticleSystem get()
public void add(ParticleBatch<?> batch)
public void add(ParticleEffect effect)
public void remove(ParticleEffect effect)
public void removeAll()
public void update()
public void updateAndDraw()
public void begin()
public void draw()
public void end()
public void getRenderables(Array<Renderable> renderables, Pool<Renderable> pool)
RenderableProvider
Renderable
instances. Renderables are obtained from the provided Pool
and added to the provided
array. The Renderables obtained using Pool.obtain()
will later be put back into the pool, do not store them
internally. The resulting array can be rendered via a ModelBatch
.getRenderables
in interface RenderableProvider
renderables
- the output arraypool
- the pool to obtain Renderables frompublic Array<ParticleBatch<?>> getBatches()
Copyright © 2016. All rights reserved.