public class Spaceship
extends greenfoot.Actor
| Constructor and Description |
|---|
Spaceship(int position)
Create a space ship.
|
| Modifier and Type | Method and Description |
|---|---|
void |
act()
Let the ship act: move or release greeps.
|
int |
getTomatoCount()
Return the current count of tomatos collected.
|
boolean |
isEmpty()
True if all passengers are out.
|
void |
move()
Move the ship down (for movement before landing).
|
void |
storeTomato(Creature cr)
Record that we have collected another tomato.
|
addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, turn, turnTowardspublic Spaceship(int position)
public void act()
act in class greenfoot.Actorpublic boolean isEmpty()
public void move()
public void storeTomato(Creature cr)
public int getTomatoCount()