java.lang.Objectgreenfoot.Actor
SmoothMover
Bubble
public class Bubble
This class creates a Bubble object
| Constructor Summary | |
|---|---|
Bubble(int size)
Constructor for the objects of class Bubble. |
|
Bubble(int size,
Vector speed,
java.lang.String message,
java.awt.Font font,
int x)
Constructor for the objects of class Bubble. |
|
| Method Summary | |
|---|---|
void |
act()
Act - do whatever the Bubble wants to do. |
void |
setSize(int size)
Sets the size of this bubble. |
| Methods inherited from class SmoothMover |
|---|
accelerate, addForce, getExactX, getExactY, getMovement, getSpeed, increaseSpeed, move, moveOneStep, setLocation, setLocation, setMovement, 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 Bubble(int size)
size(int) - the desirable size
public Bubble(int size,
Vector speed,
java.lang.String message,
java.awt.Font font,
int x)
size(int) - the desirable sizespeed(Vector) - the speed of the bubblemessage(String) - the message to be displayedfont(Font) - the fonts of the messagex(int) - the x coordinate where the bubble image will be drawn| Method Detail |
|---|
public void act()
act in class greenfoot.Actorpublic void setSize(int size)
size(int) - the desirable size