vooga.widget
Class Counter
java.lang.Object
Sprite
vooga.widget.Counter
public class Counter
- extends Sprite
Counter displays the images for a countdown to the start of the game
Constructor Summary |
Counter(int startPoint,
int timePerImage,
int timeAtEnd,
int width,
GameStateManager stateManager,
GameState switchTo)
Creats a counter to countdown to something then switch states. |
Method Summary |
void |
update(long elapsedTime)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Counter
public Counter(int startPoint,
int timePerImage,
int timeAtEnd,
int width,
GameStateManager stateManager,
GameState switchTo)
- Creats a counter to countdown to something then switch states.
All images must be initialized in resources before this is called.
- Parameters:
startPoint
- - the number to start at.timePerImage
- - time to spend on each image of the countertimeAtEnd
- - time to spend on the last image of the counterwidth
- - width of the images, scales the height to this widthstateManager
- - the GameStateManger of the gameswitchTo
- - the GameState to switch to when the counter is done.
update
public void update(long elapsedTime)