java.lang.Objectgreenfoot.Actor
Block
Bomb
public class Bomb
A Bomb. Explodes when hit
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 |
---|
public static final int BOMB_RADIUS
Constructor Detail |
---|
public Bomb()
Method Detail |
---|
public void addedToWorld(greenfoot.World world)
addedToWorld
in class greenfoot.Actor
world
- The world the object was added to.public void hit()
hit
in class Block