java.lang.Objectgreenfoot.Actor
Shot
public class Shot
Either kills aliens or lowers your score, depending on how lucky you are...
Constructor Summary | |
---|---|
Shot(boolean direction)
|
Method Summary | |
---|---|
void |
act()
Act - do whatever the Shot wants to do. |
void |
addedToWorld(greenfoot.World world)
Called when the object is added into the world, you can safely ignore this method. |
boolean |
getDirection()
Returns the direction of the shot. |
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 |
Constructor Detail |
---|
public Shot(boolean direction)
Method Detail |
---|
public void act()
act
in class greenfoot.Actor
public void addedToWorld(greenfoot.World world)
addedToWorld
in class greenfoot.Actor
world
- The world the object was added to.public boolean getDirection()