|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.util.GameTimers
A lightweight timer that can be used for animation in the map editor.
Field Summary | |
static boolean |
DEBUG
|
Constructor Summary | |
GameTimers()
|
Method Summary | |
static void |
killTimer(Timer timer)
Kills a timer. |
static Timer |
setRepeatingTimer(long delay,
long period,
Timed callback)
Registers a repeating timer to start after the specified delay. |
static Timer |
setRepeatingTimer(long period,
Timed callback)
Registers a repeating timer. |
static Timer |
setTimer(long delay,
Timed callback)
Registers a one-shot timer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean DEBUG
Constructor Detail |
public GameTimers()
Method Detail |
public static Timer setTimer(long delay, Timed callback)
delay
- the timer delay, in milliseconds.callback
- a Timed object to call when the time elapses
Timers.setTimer(long, wyvern.lib.Timed)
public static Timer setRepeatingTimer(long period, Timed callback)
This method will throw an IllegalArgumentException if any of the following conditions is true:
period
- the timer interval, in milliseconds.callback
- a Timed object to call when the time elapses
Timers.setRepeatingTimer(wyvern.lib.Timed, long)
public static Timer setRepeatingTimer(long delay, long period, Timed callback)
* This method will throw an IllegalArgumentException if any of the following conditions is true:
delay
- how long to wait before the first timer is deliveredperiod
- the timer interval, in milliseconds.callback
- a Timed object to call when the time elapses
Timers.setRepeatingTimer(wyvern.lib.Timed, long, long)
public static void killTimer(Timer timer)
timer
- the Timer returned by setTimer.Timers.killTimer(wyvern.lib.Timer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |