org.newdawn.slick.particles.effects
Class FireEmitter

java.lang.Object
  extended by org.newdawn.slick.particles.effects.FireEmitter
All Implemented Interfaces:
ParticleEmitter

public class FireEmitter
extends java.lang.Object
implements ParticleEmitter

A stock effect for fire usin the particle system

Author:
kevin

Constructor Summary
FireEmitter()
          Create a default fire effect at 0,0
FireEmitter(int x, int y)
          Create a default fire effect at x,y
FireEmitter(int x, int y, float size)
          Create a default fire effect at x,y
 
Method Summary
 boolean completed()
          Check if this emitter has completed it's cycle
 Image getImage()
          Get the image to draw for each particle
 boolean isEnabled()
          Check if the emitter is enabled
 boolean isOriented()
          Check if the particles produced should maintain orientation
 void resetState()
          Clear the state of emitter back to default
 void setEnabled(boolean enabled)
          Indicate whether the emitter should be enabled
 void update(ParticleSystem system, int delta)
          Update the emitter, produce any particles required by requesting them from the particle system provided.
 void updateParticle(Particle particle, int delta)
          Update a single particle that this emitter produced
 boolean useAdditive()
          Check if this emitter should use additive blending
 boolean usePoints(ParticleSystem system)
          Check if this emitter should use points based on it's own settings and those of the particle system
 void wrapUp()
          Wrap up the particle emitter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FireEmitter

public FireEmitter()
Create a default fire effect at 0,0


FireEmitter

public FireEmitter(int x,
                   int y)
Create a default fire effect at x,y

Parameters:
x - The x coordinate of the fire effect
y - The y coordinate of the fire effect

FireEmitter

public FireEmitter(int x,
                   int y,
                   float size)
Create a default fire effect at x,y

Parameters:
x - The x coordinate of the fire effect
y - The y coordinate of the fire effect
size - The size of the particle being pumped out
Method Detail

update

public void update(ParticleSystem system,
                   int delta)
Description copied from interface: ParticleEmitter
Update the emitter, produce any particles required by requesting them from the particle system provided.

Specified by:
update in interface ParticleEmitter
Parameters:
system - The particle system used to create particles
delta - The amount of time in milliseconds since last emitter update
See Also:
ParticleEmitter.update(org.newdawn.slick.particles.ParticleSystem, int)

updateParticle

public void updateParticle(Particle particle,
                           int delta)
Description copied from interface: ParticleEmitter
Update a single particle that this emitter produced

Specified by:
updateParticle in interface ParticleEmitter
Parameters:
particle - The particle to be updated
delta - The amount of time in millisecond since last particle update
See Also:
ParticleEmitter.updateParticle(org.newdawn.slick.particles.Particle, int)

isEnabled

public boolean isEnabled()
Description copied from interface: ParticleEmitter
Check if the emitter is enabled

Specified by:
isEnabled in interface ParticleEmitter
Returns:
True if the emitter is enabled
See Also:
ParticleEmitter.isEnabled()

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: ParticleEmitter
Indicate whether the emitter should be enabled

Specified by:
setEnabled in interface ParticleEmitter
Parameters:
enabled - True if the emitter should be enabled
See Also:
ParticleEmitter.setEnabled(boolean)

completed

public boolean completed()
Description copied from interface: ParticleEmitter
Check if this emitter has completed it's cycle

Specified by:
completed in interface ParticleEmitter
Returns:
True if the emitter has completed it's cycle
See Also:
ParticleEmitter.completed()

useAdditive

public boolean useAdditive()
Description copied from interface: ParticleEmitter
Check if this emitter should use additive blending

Specified by:
useAdditive in interface ParticleEmitter
Returns:
True if the emitter should use the right blending
See Also:
ParticleEmitter.useAdditive()

getImage

public Image getImage()
Description copied from interface: ParticleEmitter
Get the image to draw for each particle

Specified by:
getImage in interface ParticleEmitter
Returns:
The image to draw for each particle
See Also:
ParticleEmitter.getImage()

usePoints

public boolean usePoints(ParticleSystem system)
Description copied from interface: ParticleEmitter
Check if this emitter should use points based on it's own settings and those of the particle system

Specified by:
usePoints in interface ParticleEmitter
Parameters:
system - The particle system to cross check agianst
Returns:
True if we should use points
See Also:
ParticleEmitter.usePoints(org.newdawn.slick.particles.ParticleSystem)

isOriented

public boolean isOriented()
Description copied from interface: ParticleEmitter
Check if the particles produced should maintain orientation

Specified by:
isOriented in interface ParticleEmitter
Returns:
True if the particles produced should maintain orientation
See Also:
ParticleEmitter.isOriented()

wrapUp

public void wrapUp()
Description copied from interface: ParticleEmitter
Wrap up the particle emitter. This means the emitter will no longer produce particles and will be marked as completed once the particles have expired

Specified by:
wrapUp in interface ParticleEmitter
See Also:
ParticleEmitter.wrapUp()

resetState

public void resetState()
Description copied from interface: ParticleEmitter
Clear the state of emitter back to default

Specified by:
resetState in interface ParticleEmitter
See Also:
ParticleEmitter.resetState()


Copyright © 2006 New Dawn Software. All Rights Reserved.