Module technology.sola.engine
Class ParticleEmissionConfiguration
java.lang.Object
technology.sola.engine.physics.component.particle.ParticleConfiguration
technology.sola.engine.physics.component.particle.ParticleEmissionConfiguration
ParticleEmissionConfiguration contains configuration for the emission properties for emitting
Particles.-
Method Summary
Modifier and TypeMethodDescriptionint@Nullable Integercycles()floatinterval()floatmaxLife()floatminLife()setCountPerEmit(int countPerEmit) Updates the number of particles to emit per emission.Updates the number of emission cycles before this emitter turns off.setInterval(float interval) Updates the interval between each particle emission.setLife(float life) Updates the lifespan for newly emittedParticles to be a fixed value.setLifeBounds(float minLife, float maxLife) Updates the minimum and maximum lifespans for newly emittedParticles.setShape(ParticleEmitterShape shape) Updates theParticleEmitterShapefor this emitter.shape()Methods inherited from class technology.sola.engine.physics.component.particle.ParticleConfiguration
done
-
Method Details
-
shape
- Returns:
- the
ParticleEmitterShapefor this emitter. Defaults toCircleEmitterShape
-
setShape
Updates theParticleEmitterShapefor this emitter.- Parameters:
shape- the new shape- Returns:
- this
-
minLife
public float minLife()- Returns:
- the minimum lifespan for newly emitted
Particles
-
maxLife
public float maxLife()- Returns:
- the maximum lifespan for newly emitted
Particles
-
setLifeBounds
Updates the minimum and maximum lifespans for newly emittedParticles.- Parameters:
minLife- the minimum lifespan for a new particlemaxLife- the maximum lifespan for a new particle- Returns:
- this
-
setLife
Updates the lifespan for newly emittedParticles to be a fixed value.- Parameters:
life- the lifespan for new particles- Returns:
- this
-
interval
public float interval()- Returns:
- the interval between each particle emission in seconds
-
setInterval
Updates the interval between each particle emission.- Parameters:
interval- the new particle emission interval (in seconds)- Returns:
- this
-
countPerEmit
public int countPerEmit()- Returns:
- the number of particles to emit per emission
-
setCountPerEmit
Updates the number of particles to emit per emission.- Parameters:
countPerEmit- the new number of particles to emit- Returns:
- this
-
cycles
- Returns:
- the number of emission cycles before this emitter turns off.
-
setCycles
Updates the number of emission cycles before this emitter turns off. Set cycles tonullto emit particles continuously.- Parameters:
cycles- the number of emission cycles before this emitter turns off.- Returns:
- this
-