Class ParticleSpawner
java.lang.Object
rekit.logic.gameelements.particles.ParticleSpawner
- All Implemented Interfaces:
org.fuchss.configuration.Configurable
- Direct Known Subclasses:
TextParticleSpawner
@SetterInfo(res="",
set=false)
public class ParticleSpawner
extends Object
implements org.fuchss.configuration.Configurable
This class will be used to manage the spawning of particles.
You have to set the parameters of the particles by the public Fields of your ParticleSpawner Object
You have to set the parameters of the particles by the public Fields of your ParticleSpawner Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
The maximum amount of particles.int
The minimum amount of particles.The angle of the particle.Alpha Channel.Blue Channel.Green Channel.Red Channel.protected Particle
The particle prototype.The current polygon.The rotation of the particle.The size of the particle.The speed of the particle.float
The maximum lifetime.float
The minimum lifetime. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new particle spawner with its default values.ParticleSpawner
(Particle prototype) Create a new ParticleSpawner by prototype. -
Method Summary
-
Field Details
-
particlePrototype
The particle prototype. -
polygon
The current polygon. -
colorR
Red Channel. -
colorG
Green Channel. -
colorB
Blue Channel. -
colorA
Alpha Channel. -
speed
The speed of the particle. -
angle
The angle of the particle. -
rotation
The rotation of the particle. -
size
The size of the particle. -
amountMin
public int amountMinThe minimum amount of particles. -
amountMax
public int amountMaxThe maximum amount of particles. -
timeMin
public float timeMinThe minimum lifetime. -
timeMax
public float timeMaxThe maximum lifetime.
-
-
Constructor Details
-
ParticleSpawner
Create a new ParticleSpawner by prototype.- Parameters:
prototype
- the prototype
-
ParticleSpawner
public ParticleSpawner()Create a new particle spawner with its default values.
-
-
Method Details
-
spawn
Spawn particles in aIScene
at a position.- Parameters:
scene
- the scenepos
- the position
-