java.lang.Objectgreenfoot.Actor
MotherShip
public abstract class MotherShip
This class implements some of the more complicated functionality of the ship, and is provided complete. It does not need to be modified.
Constructor Summary | |
---|---|
MotherShip()
|
Method Summary | |
---|---|
void |
act()
Act - do whatever the Ship wants to do. |
void |
addedToWorld(greenfoot.World world)
Called when the object is added into the world, you can safely ignore this method. |
void |
fire()
Fires a shot |
boolean |
isShot()
Returns whether the ship is shot |
void |
moveLeft()
Move the ship left |
void |
moveRight()
Move the ship right |
boolean |
shotKey()
Returns whether a shot should be fired. |
void |
updateScore(int x)
Updates the score. |
Methods inherited from class greenfoot.Actor |
---|
getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, 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 MotherShip()
Method Detail |
---|
public void act()
act
in class greenfoot.Actor
public void addedToWorld(greenfoot.World world)
addedToWorld
in class greenfoot.Actor
public void fire()
public boolean isShot()
public void moveLeft()
public void moveRight()
public boolean shotKey()
public void updateScore(int x)