java.lang.Objectgreenfoot.Actor
SmoothMover
Balloon
public class Balloon
This class creates a Balloon object.
| Constructor Summary | |
|---|---|
Balloon(int size)
Constructor for objects of class Balloon. |
|
Balloon(int size,
Vector speed,
java.lang.String letter)
Constructor for objects of class Balloon |
|
| Method Summary | |
|---|---|
void |
act()
Act - do whatever the Balloon wants to do. |
void |
breakBalloon()
Breakes the balloon. |
void |
drawSomeLetter(java.lang.String letter,
java.awt.Color color)
Draws a given letter in a specific color in the image that represents the actor. |
void |
makeSound(boolean correct)
Makes a sound every time a key is pressed. |
void |
setSize(int size)
Sets the size of this balloon. |
| 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 Balloon(int size)
size(int) - the size of the balloon
public Balloon(int size,
Vector speed,
java.lang.String letter)
size(int) - the size of the balloonspeed(Vector) - the speed of the balloon| Method Detail |
|---|
public void act()
act in class greenfoot.Actorpublic void breakBalloon()
public void drawSomeLetter(java.lang.String letter,
java.awt.Color color)
letter(String) - the letter to be drawn in the ballooncolor(Color) - the color of the letterpublic void makeSound(boolean correct)
correct(boolean) - true if the key is correctpublic void setSize(int size)
size(int) - the desirable size