Class Emitter
- java.lang.Object
-
- com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent
-
- com.badlogic.gdx.graphics.g3d.particles.emitters.Emitter
-
- All Implemented Interfaces:
ResourceData.Configurable
,Disposable
,Json.Serializable
- Direct Known Subclasses:
RegularEmitter
public abstract class Emitter extends ParticleControllerComponent implements Json.Serializable
AnEmitter
is aParticleControllerComponent
which will handle the particles emission. It must update thepercent
to reflect the current percentage of the current emission cycle. It should considerminParticleCount
andmaxParticleCount
to rule particle emission. It should notify the particle controller when particles are activated, killed, or when an emission cycle begins.
-
-
Field Summary
Fields Modifier and Type Field Description int
maxParticleCount
The min/max quantity of particlesint
minParticleCount
The min/max quantity of particlesfloat
percent
Current state of the emission, should be currentTime/ duration Must be updated on each update
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
end()
Called at the end of the simulation.int
getMaxParticleCount()
int
getMinParticleCount()
void
init()
Called once during intializationboolean
isComplete()
void
read(Json json, JsonValue jsonData)
void
set(Emitter emitter)
void
setMaxParticleCount(int maxParticleCount)
void
setMinParticleCount(int minParticleCount)
void
setParticleCount(int aMin, int aMax)
void
write(Json json)
-
Methods inherited from class com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent
activateParticles, allocateChannels, copy, dispose, killParticles, load, save, set, start, update
-
-
-
-
Constructor Detail
-
Emitter
public Emitter(Emitter regularEmitter)
-
Emitter
public Emitter()
-
-
Method Detail
-
init
public void init()
Description copied from class:ParticleControllerComponent
Called once during intialization- Overrides:
init
in classParticleControllerComponent
-
end
public void end()
Description copied from class:ParticleControllerComponent
Called at the end of the simulation.- Overrides:
end
in classParticleControllerComponent
-
isComplete
public boolean isComplete()
-
getMinParticleCount
public int getMinParticleCount()
-
setMinParticleCount
public void setMinParticleCount(int minParticleCount)
-
getMaxParticleCount
public int getMaxParticleCount()
-
setMaxParticleCount
public void setMaxParticleCount(int maxParticleCount)
-
setParticleCount
public void setParticleCount(int aMin, int aMax)
-
set
public void set(Emitter emitter)
-
write
public void write(Json json)
- Specified by:
write
in interfaceJson.Serializable
- Overrides:
write
in classParticleControllerComponent
-
read
public void read(Json json, JsonValue jsonData)
- Specified by:
read
in interfaceJson.Serializable
- Overrides:
read
in classParticleControllerComponent
-
-