public class ParticleEmitter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ParticleEmitter.GradientColorValue |
static class |
ParticleEmitter.NumericValue |
static class |
ParticleEmitter.Particle |
static class |
ParticleEmitter.ParticleValue |
static class |
ParticleEmitter.RangedNumericValue |
static class |
ParticleEmitter.ScaledNumericValue |
static class |
ParticleEmitter.SpawnEllipseSide |
static class |
ParticleEmitter.SpawnShape |
static class |
ParticleEmitter.SpawnShapeValue |
Modifier and Type | Field and Description |
---|---|
float |
duration |
float |
durationTimer |
Constructor and Description |
---|
ParticleEmitter() |
ParticleEmitter(BufferedReader reader) |
ParticleEmitter(ParticleEmitter emitter) |
public ParticleEmitter()
public ParticleEmitter(BufferedReader reader) throws IOException
IOException
public ParticleEmitter(ParticleEmitter emitter)
public void setMaxParticleCount(int maxParticleCount)
public void addParticle()
public void addParticles(int count)
public void update(float delta)
public void draw(Batch batch)
public void draw(Batch batch, float delta)
update(float)
and
draw(Batch)
separately.public void start()
public void reset()
public void setPosition(float x, float y)
public void setSprite(Sprite sprite)
public void allowCompletion()
continuous
setting until the emitter is started again. This allows the emitter
to stop smoothly.public Sprite getSprite()
public String getName()
public void setName(String name)
public ParticleEmitter.ScaledNumericValue getLife()
public ParticleEmitter.ScaledNumericValue getScale()
public ParticleEmitter.ScaledNumericValue getRotation()
public ParticleEmitter.GradientColorValue getTint()
public ParticleEmitter.ScaledNumericValue getVelocity()
public ParticleEmitter.ScaledNumericValue getWind()
public ParticleEmitter.ScaledNumericValue getGravity()
public ParticleEmitter.ScaledNumericValue getAngle()
public ParticleEmitter.ScaledNumericValue getEmission()
public ParticleEmitter.ScaledNumericValue getTransparency()
public ParticleEmitter.RangedNumericValue getDuration()
public ParticleEmitter.RangedNumericValue getDelay()
public ParticleEmitter.ScaledNumericValue getLifeOffset()
public ParticleEmitter.RangedNumericValue getXOffsetValue()
public ParticleEmitter.RangedNumericValue getYOffsetValue()
public ParticleEmitter.ScaledNumericValue getSpawnWidth()
public ParticleEmitter.ScaledNumericValue getSpawnHeight()
public ParticleEmitter.SpawnShapeValue getSpawnShape()
public boolean isAttached()
public void setAttached(boolean attached)
public boolean isContinuous()
public void setContinuous(boolean continuous)
public boolean isAligned()
public void setAligned(boolean aligned)
public boolean isAdditive()
public void setAdditive(boolean additive)
public boolean cleansUpBlendFunction()
Batch
's blend
function to the alpha-blending default (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) when done drawing.public void setCleansUpBlendFunction(boolean cleansUpBlendFunction)
Batch
's blend function to the
alpha-blending default (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) when done drawing. Is true by default. If set to false, the
Batch's blend function is left as it was for drawing this ParticleEmitter, which prevents the Batch from being flushed
repeatedly if consecutive ParticleEmitters with the same additive or pre-multiplied alpha state are drawn in a row.
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.
cleansUpBlendFunction
- public boolean isBehind()
public void setBehind(boolean behind)
public boolean isPremultipliedAlpha()
public void setPremultipliedAlpha(boolean premultipliedAlpha)
public int getMinParticleCount()
public void setMinParticleCount(int minParticleCount)
public int getMaxParticleCount()
public boolean isComplete()
public float getPercentComplete()
public float getX()
public float getY()
public int getActiveCount()
public String getImagePath()
public void setImagePath(String imagePath)
public void setFlip(boolean flipX, boolean flipY)
public void flipY()
public BoundingBox getBoundingBox()
public void save(Writer output) throws IOException
IOException
public void load(BufferedReader reader) throws IOException
IOException
Copyright © 2016. All rights reserved.