public class ParticleEffect extends Object implements Disposable
Constructor and Description |
---|
ParticleEffect() |
ParticleEffect(ParticleEffect effect) |
Modifier and Type | Method and Description |
---|---|
void |
allowCompletion() |
void |
dispose()
Disposes the texture for each sprite for each ParticleEmitter.
|
void |
draw(Batch spriteBatch) |
void |
draw(Batch spriteBatch,
float delta) |
ParticleEmitter |
findEmitter(String name)
Returns the emitter with the specified name, or null.
|
void |
flipY() |
BoundingBox |
getBoundingBox()
Returns the bounding box for all active particles.
|
Array<ParticleEmitter> |
getEmitters() |
boolean |
isComplete() |
void |
load(FileHandle effectFile,
FileHandle imagesDir) |
void |
load(FileHandle effectFile,
TextureAtlas atlas) |
void |
load(FileHandle effectFile,
TextureAtlas atlas,
String atlasPrefix) |
void |
loadEmitterImages(FileHandle imagesDir) |
void |
loadEmitterImages(TextureAtlas atlas) |
void |
loadEmitterImages(TextureAtlas atlas,
String atlasPrefix) |
void |
loadEmitters(FileHandle effectFile) |
void |
reset() |
void |
save(Writer output) |
void |
scaleEffect(float scaleFactor) |
void |
setDuration(int duration) |
void |
setEmittersCleanUpBlendFunction(boolean cleanUpBlendFunction)
Sets the
cleansUpBlendFunction
parameter on all ParticleEmitters currently in this ParticleEffect. |
void |
setFlip(boolean flipX,
boolean flipY) |
void |
setPosition(float x,
float y) |
void |
start() |
void |
update(float delta) |
public ParticleEffect()
public ParticleEffect(ParticleEffect effect)
public void start()
public void reset()
public void update(float delta)
public void draw(Batch spriteBatch)
public void draw(Batch spriteBatch, float delta)
public void allowCompletion()
public boolean isComplete()
public void setDuration(int duration)
public void setPosition(float x, float y)
public void setFlip(boolean flipX, boolean flipY)
public void flipY()
public Array<ParticleEmitter> getEmitters()
public ParticleEmitter findEmitter(String name)
public void save(Writer output) throws IOException
IOException
public void load(FileHandle effectFile, FileHandle imagesDir)
public void load(FileHandle effectFile, TextureAtlas atlas)
public void load(FileHandle effectFile, TextureAtlas atlas, String atlasPrefix)
public void loadEmitters(FileHandle effectFile)
public void loadEmitterImages(TextureAtlas atlas)
public void loadEmitterImages(TextureAtlas atlas, String atlasPrefix)
public void loadEmitterImages(FileHandle imagesDir)
public void dispose()
dispose
in interface Disposable
public BoundingBox getBoundingBox()
public void scaleEffect(float scaleFactor)
public void setEmittersCleanUpBlendFunction(boolean cleanUpBlendFunction)
cleansUpBlendFunction
parameter on all ParticleEmitters
currently in this ParticleEffect.
IMPORTANT: If set to false and if the next object to use this Batch expects alpha blending, you are responsible for setting the Batch's blend function to (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) before that next object is drawn.
cleanUpBlendFunction
- Copyright © 2015. All rights reserved.