java.lang.Objectgreenfoot.World
City
public class City
Class City represents the world from which Snail is trying to escape. Players must type the letter they see on top of the screen. The more they type correctly the faster Snail moves.
| Constructor Summary | |
|---|---|
City(Snail snail)
Constructor for objects of class City. |
|
| Method Summary | |
|---|---|
void |
act()
Act method for class City. |
void |
gameOver(java.lang.String message)
This method is called when the game is over to display the final score. |
Counter |
getLifeCounter()
Returns the lifeCounter. |
Counter |
getScoreCounter()
Returns the scoreCounter. |
void |
scrollBackground()
Makes background scroll |
| Methods inherited from class greenfoot.World |
|---|
addObject, getBackground, getCellSize, getColorAt, getHeight, getObjects, getObjectsAt, getWidth, numberOfObjects, removeObject, removeObjects, repaint, setActOrder, setBackground, setBackground, setPaintOrder, showText, started, stopped |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public City(Snail snail)
| Method Detail |
|---|
public void act()
act in class greenfoot.Worldpublic void gameOver(java.lang.String message)
message(String) - the message to be displayed when the game is over.public Counter getLifeCounter()
public Counter getScoreCounter()
public void scrollBackground()