Constructor and Description |
---|
Particles() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the resources used by the custom shader that renders particles.
|
Emitter |
createEmitter(int maxParticles,
Image image)
Creates an emitter that supports up to
maxParticles particles at any one time. |
Emitter |
createEmitter(int maxParticles,
Image image,
GroupLayer onLayer)
Creates an emitter that supports up to
maxParticles particles at any one time. |
void |
paint(Clock clock)
Updates all registered emitters.
|
public Emitter createEmitter(int maxParticles, Image image)
maxParticles
particles at any one time. The
emitter is added to the root layer.image
- the image to use for each particle.public Emitter createEmitter(int maxParticles, Image image, GroupLayer onLayer)
maxParticles
particles at any one time.image
- the image to use for each particle.onLayer
- the layer to which to add the layer which will render the particles.public void paint(Clock clock)
Game.paint
or similar.public void clear()
Copyright © 2015. All Rights Reserved.