Particle Explosion
class ParticleExplosion(epicentre: Vec2, noOfParticles: Int, lifespan: Double)
Content copied to clipboard
Models particle explosions.
Parameters
epicentre
Vector location of explosion epicenter.
no Of Particles
Total number of particles the explosion has.
lifespan
The life time of the particle.
Constructors
Link copied to clipboard
fun ParticleExplosion(epicentre: Vec2, noOfParticles: Int, lifespan: Double)
Content copied to clipboard
Functions
Link copied to clipboard
Applies a blast impulse to all particles created.
Link copied to clipboard
fun createParticles(size: Double, density: Int, radius: Int, world: World)
Content copied to clipboard
Creates particles in the supplied world.