public abstract class ParticleEmitter extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ParticleEmitter.EmitterType |
Possible emitter types.
|
| Modifier | Constructor | Description |
|---|---|---|
protected |
ParticleEmitter() |
Simple constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
float |
getAngle() |
|
be.yildizgames.common.geometry.Point3D |
getDirection() |
|
float |
getDuration() |
|
Color |
getEndColor() |
|
float |
getLifeTime() |
|
float |
getMaxSpeed() |
|
float |
getMinSpeed() |
|
float |
getRate() |
|
float |
getRepeatDelay() |
|
Color |
getStartColor() |
|
void |
setAngle(float newAngle) |
Set the emitter angle.
|
protected abstract void |
setAngleImpl(float angle) |
Set the angle in implementation.
|
void |
setDirection(be.yildizgames.common.geometry.Point3D direction) |
Change the emitter direction.
|
protected abstract void |
setDirectionImpl(be.yildizgames.common.geometry.Point3D direction) |
Set the direction in implementation.
|
void |
setDuration(float newDuration) |
Set the emission duration, in second, minimum value is 0.
|
protected abstract void |
setDurationImpl(float duration) |
Set the duration in implementation.
|
void |
setEndColor(Color end) |
Set the particle color when dying.
|
protected abstract void |
setEndColorImpl(Color end) |
Set the end color in implementation.
|
void |
setLifeTime(float lifeTime) |
Set the time a particle live, in seconds.
|
protected abstract void |
setLifeTimeImpl(float lifeTime) |
Set the life time in implementation.
|
void |
setMaxSpeed(float maxSpeed) |
Set the particle maximum speed.
|
protected abstract void |
setMaxSpeedImpl(float maxSpeed) |
Set the maximum speed in implementation.
|
void |
setMinSpeed(float minSpeed) |
Set the particle minimum speed.
|
protected abstract void |
setMinSpeedImpl(float minSpeed) |
Set the minimum speed in implementation.
|
ParticleEmitter |
setRate(float newRate) |
Set the emission rate per second, minimum value is 0.
|
protected abstract void |
setRateImpl(float rate) |
Set the rate in implementation.
|
void |
setRepeatDelay(float repeatDelay) |
Set the time to wait for the emitter restart when it has finished its job.
|
protected abstract void |
setRepeatDelayImpl(float repeatDelay) |
Set the delay in implementation.
|
void |
setSpeed(float speed) |
Set a constant speed for the emission.
|
void |
setStartColor(Color start) |
Set the particle color when created.
|
protected abstract void |
setStartColorImpl(Color start) |
Set the start color in implementation.
|
void |
start() |
Restart the emission if it has been stopped by the stop method.
|
void |
stop() |
Stop the emission by setting the rate at 0, call start to restart it.
|
public final void setAngle(float newAngle)
newAngle - New angle value in degree, must be between 0 and 180.public final ParticleEmitter setRate(float newRate)
newRate - Number of particles emitted per second.public final void setDuration(float newDuration)
newDuration - New emission duration value.public final void setLifeTime(float lifeTime)
lifeTime - Particle life time.public final void setDirection(be.yildizgames.common.geometry.Point3D direction)
direction - Emitter direction, it is a copy, modifying it from outside wont affect the emitter direction.public final void setMinSpeed(float minSpeed)
minSpeed - Particle minimum speed value.public final void setMaxSpeed(float maxSpeed)
maxSpeed - Particle maximum speed value.public final void setStartColor(Color start)
start - Particle color at the beginning of their life.public final void setEndColor(Color end)
end - Particle color at the end of their life.public final void setRepeatDelay(float repeatDelay)
repeatDelay - Time to wait.public final void stop()
public final void start()
public final void setSpeed(float speed)
speed - The particles speed.public float getAngle()
public float getRate()
public float getDuration()
public float getLifeTime()
public be.yildizgames.common.geometry.Point3D getDirection()
public float getMinSpeed()
public float getMaxSpeed()
public Color getStartColor()
public Color getEndColor()
public float getRepeatDelay()
protected abstract void setAngleImpl(float angle)
angle - New angle value.protected abstract void setRepeatDelayImpl(float repeatDelay)
repeatDelay - new Delay value.protected abstract void setEndColorImpl(Color end)
end - New color value.protected abstract void setMinSpeedImpl(float minSpeed)
minSpeed - New speed value.protected abstract void setMaxSpeedImpl(float maxSpeed)
maxSpeed - New speed value.protected abstract void setStartColorImpl(Color start)
start - New start color.protected abstract void setDirectionImpl(be.yildizgames.common.geometry.Point3D direction)
direction - New direction value.protected abstract void setDurationImpl(float duration)
duration - New duration value.protected abstract void setRateImpl(float rate)
rate - New rate value.protected abstract void setLifeTimeImpl(float lifeTime)
lifeTime - New lifeTime value.Copyright © 2014–2018. All rights reserved.