org.jrabbit.standard.game.objects.particles.generic
Class ExplosionParticle

java.lang.Object
  extended by org.jrabbit.standard.game.objects.base.Spatial
      extended by org.jrabbit.standard.game.objects.base.BaseSprite
          extended by org.jrabbit.standard.game.objects.particles.base.Particle
              extended by org.jrabbit.standard.game.objects.particles.generic.GenericParticle
                  extended by org.jrabbit.standard.game.objects.particles.generic.SprayParticle
                      extended by org.jrabbit.standard.game.objects.particles.generic.ExplosionParticle
All Implemented Interfaces:
Renderable, Updateable, Skin, GLTransform, Colored, Dimensioned, GLGroupTransformed, Located, Rotated, Scaled, ScreenObject, Visible

public class ExplosionParticle
extends SprayParticle

ExplosionParticle extends SprayParticle to simplify the process of creating a certain type of particle effect - in this case, a particle sent straight out from its origin at a random angle. This effect is useful for things like fireworks, explosions, impact effects, and any "burst"-like affect.

Author:
Chris Molini

Field Summary
 
Fields inherited from class org.jrabbit.standard.game.objects.particles.generic.GenericParticle
acceleration, fadeRate, scaleRate, spinRate, velocity
 
Fields inherited from class org.jrabbit.standard.game.objects.particles.base.Particle
parent, skinID
 
Fields inherited from class org.jrabbit.standard.game.objects.base.BaseSprite
color, screenCoords, transforms, visible
 
Fields inherited from class org.jrabbit.standard.game.objects.base.Spatial
location, rotation, scalar
 
Constructor Summary
ExplosionParticle(float speed, float scaleRate, float spinRate, float lifetime)
          Creates an Explosion Particle with the indicated settings.
 
Method Summary
 
Methods inherited from class org.jrabbit.standard.game.objects.particles.generic.SprayParticle
genAngledVelocity
 
Methods inherited from class org.jrabbit.standard.game.objects.particles.generic.GenericParticle
appendToParent, update
 
Methods inherited from class org.jrabbit.standard.game.objects.particles.base.Particle
draw, height, kill, setParent, setSkinID, skin, skinID, width
 
Methods inherited from class org.jrabbit.standard.game.objects.base.BaseSprite
bind, color, onscreen, release, render, screenCoords, setVisible, shouldRender, transforms, visible
 
Methods inherited from class org.jrabbit.standard.game.objects.base.Spatial
location, rotation, scalar, scaledDiameter, scaledHeight, scaledWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExplosionParticle

public ExplosionParticle(float speed,
                         float scaleRate,
                         float spinRate,
                         float lifetime)
Creates an Explosion Particle with the indicated settings.

Parameters:
speed - How quickly the particle moves away from its origin.
scaleRate - The rate at which the particle scales. It's probably best to make this a negative value (so the particle shrinks).
spinRate - The rate at which the particle spins.
lifetime - The length of time the particle should remain alive. The particle gradually fades out during this period.