Class Fire

java.lang.Object
  extended by Obj
      extended by Fire

public class Fire
extends Obj

This class just sits there and disappears after a set amount of time.

Author:
Jonathan

Nested Class Summary
(package private)  class Fire.Disappear
          The class that removes the fire from the grid after the time has expired.
 
Field Summary
private  int DELAY
           
private  java.awt.image.BufferedImage fireImage
           
private  int fireType
           
private  java.util.Timer time
           
 
Constructor Summary
Fire(Grid gr, int type)
          Fire will wait in the grid for a short time, then disappear.
 
Method Summary
 int getFireType()
          Returns the firetype of the fire.
 java.awt.image.BufferedImage getImage()
          Returns the image to be drawn in the grid.
 
Methods inherited from class Obj
getGrid, getX, getY, moveTo, putSelfInGrid, removeSelfFromGrid, setX, setY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

time

private java.util.Timer time

DELAY

private final int DELAY
See Also:
Constant Field Values

fireType

private int fireType

fireImage

private java.awt.image.BufferedImage fireImage
Constructor Detail

Fire

public Fire(Grid gr,
            int type)
Fire will wait in the grid for a short time, then disappear.

Parameters:
gr - the Grid this Fire is in
Method Detail

getImage

public java.awt.image.BufferedImage getImage()
Description copied from class: Obj
Returns the image to be drawn in the grid.

Specified by:
getImage in class Obj
Returns:
the image to be drawn.

getFireType

public int getFireType()
Returns the firetype of the fire.

Returns:
The type of the fires.