java.lang.Objectgreenfoot.Actor
SmoothMover
Snail
public class Snail
This class creates a Snail object.
| Constructor Summary | |
|---|---|
Snail(int size)
Constructor for the objects of class Snail. |
|
Snail(int size,
Vector speed)
Constructor for the objects of class Snail. |
|
| Method Summary | |
|---|---|
void |
act()
Act - do whatever the Snail wants to do. |
void |
makeSound(boolean correct)
Makes a sound every time a key is pressed. |
void |
setSize(int size)
Sets the size of this snail. |
| Methods inherited from class SmoothMover |
|---|
accelerate, addForce, getExactX, getExactY, getMovement, getSpeed, increaseSpeed, move, moveOneStep, setLocation, setLocation, stop |
| Methods inherited from class greenfoot.Actor |
|---|
addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setRotation, turn, turnTowards |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Snail(int size)
size(int) - the desirable size
public Snail(int size,
Vector speed)
size(int) - the desirable sizespeed(Vector) - the speed of the snail| Method Detail |
|---|
public void act()
act in class greenfoot.Actorpublic void makeSound(boolean correct)
correct(boolean) - true if the key is correctpublic void setSize(int size)
size(int) - the desirable size