public class Counter
extends greenfoot.Actor
| Modifier and Type | Field and Description |
|---|---|
static float |
FONT_SIZE |
| Constructor and Description |
|---|
Counter()
Create a counter without text.
|
Counter(java.lang.String prefix)
Create a counter with prefix text, and 0 value.
|
Counter(java.lang.String prefix,
int value)
Create a counter with prefix text and value.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getValue()
Return the current counter value.
|
void |
increment()
Increment the counter by one.
|
act, addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, turn, turnTowardspublic static final float FONT_SIZE