Class Shot

java.lang.Object
  extended by greenfoot.Actor
      extended by Shot

public class Shot
extends greenfoot.Actor

Either kills aliens or lowers your score, depending on how lucky you are...

Version:
28/03/2008
Author:
Michael Berry

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

Shot

public Shot(boolean direction)
Method Detail

act

public void act()
Act - do whatever the Shot wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment.

Overrides:
act in class greenfoot.Actor

addedToWorld

public void addedToWorld(greenfoot.World world)
Called when the object is added into the world, you can safely ignore this method.

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

getDirection

public boolean getDirection()
Returns the direction of the shot.