-
- All Implemented Interfaces:
public final class ParticleExplosion
Models particle explosions.
-
-
Constructor Summary
Constructors Constructor Description ParticleExplosion(Vec2 epicentre, Integer noOfParticles, Double lifespan)
-
Method Summary
Modifier and Type Method Description final List<Body>
getParticles()
Getter to return the list of particles in the world. final Unit
createParticles(Double size, Integer density, Integer radius, World world)
Creates particles in the supplied world. final Unit
applyBlastImpulse(Double blastPower)
Applies a blast impulse to all particles created. -
-
Method Detail
-
getParticles
final List<Body> getParticles()
Getter to return the list of particles in the world.
-
createParticles
final Unit createParticles(Double size, Integer density, Integer radius, World world)
Creates particles in the supplied world.
- Parameters:
size
- The size of the particles.density
- The density of the particles.radius
- The distance away from the epicenter the particles are placed.world
- The world the particles are created in.
-
applyBlastImpulse
final Unit applyBlastImpulse(Double blastPower)
Applies a blast impulse to all particles created.
- Parameters:
blastPower
- The impulse magnitude.
-
-
-
-