Class Bomb

java.lang.Object
  extended by greenfoot.Actor
      extended by Block
          extended by Bomb

public class Bomb
extends Block

A Bomb. Explodes when hit

Version:
(a version number or a date)
Author:
Michael Berry

Field Summary
static int BOMB_RADIUS
          Objects within this distance take a hit when the bomb explodes.
 
Constructor Summary
Bomb()
          Create a new Bomb
 
Method Summary
 void addedToWorld(greenfoot.World world)
          Called when the object is added to the world.
 void hit()
          When hit, explode
 
Methods inherited from class Block
act, getLife
 
Methods inherited from class greenfoot.Actor
getHeight, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWidth, getWorld, getX, getY, intersects, setImage, setImage, setLocation, setRotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOMB_RADIUS

public static final int BOMB_RADIUS
Objects within this distance take a hit when the bomb explodes.

See Also:
Constant Field Values
Constructor Detail

Bomb

public Bomb()
Create a new Bomb

Method Detail

addedToWorld

public void addedToWorld(greenfoot.World world)
Called when the object is added to the world. Maintain a copy of the board for reference.

Overrides:
addedToWorld in class greenfoot.Actor
Parameters:
world - The world the object was added to.

hit

public void hit()
When hit, explode

Overrides:
hit in class Block