|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.utils.Timer
public class Timer
Executes tasks in the future on the main loop thread.
Nested Class Summary | |
---|---|
static class |
Timer.Task
Runnable with a cancel method. |
Field Summary | |
---|---|
static Timer |
instance
Timer instance for general application wide usage. |
Constructor Summary | |
---|---|
Timer()
|
Method Summary | |
---|---|
void |
clear()
Cancels all tasks. |
static void |
post(Timer.Task task)
Schedules a task on instance . |
void |
postTask(Timer.Task task)
Schedules a task to occur once as soon as possible, but not sooner than the start of the next frame. |
static void |
schedule(Timer.Task task,
float delaySeconds)
Schedules a task on instance . |
static void |
schedule(Timer.Task task,
float delaySeconds,
float intervalSeconds)
Schedules a task on instance . |
static void |
schedule(Timer.Task task,
float delaySeconds,
float intervalSeconds,
int repeatCount)
Schedules a task on instance . |
void |
scheduleTask(Timer.Task task,
float delaySeconds)
Schedules a task to occur once after the specified delay. |
void |
scheduleTask(Timer.Task task,
float delaySeconds,
float intervalSeconds)
Schedules a task to occur once after the specified delay and then repeatedly at the specified interval until cancelled. |
void |
scheduleTask(Timer.Task task,
float delaySeconds,
float intervalSeconds,
int repeatCount)
Schedules a task to occur once after the specified delay and then a number of additional times at the specified interval. |
void |
start()
Starts the timer if it was stopped. |
void |
stop()
Stops the timer, tasks will not be executed and time that passes will not be applied to the task delays. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Timer instance
Timer
make convenient use of this instance.
Constructor Detail |
---|
public Timer()
Method Detail |
---|
public void postTask(Timer.Task task)
public void scheduleTask(Timer.Task task, float delaySeconds)
public void scheduleTask(Timer.Task task, float delaySeconds, float intervalSeconds)
public void scheduleTask(Timer.Task task, float delaySeconds, float intervalSeconds, int repeatCount)
public void stop()
public void start()
public void clear()
public static void post(Timer.Task task)
instance
.
postTask(Task)
public static void schedule(Timer.Task task, float delaySeconds)
instance
.
scheduleTask(Task, float)
public static void schedule(Timer.Task task, float delaySeconds, float intervalSeconds)
instance
.
scheduleTask(Task, float, float)
public static void schedule(Timer.Task task, float delaySeconds, float intervalSeconds, int repeatCount)
instance
.
scheduleTask(Task, float, float, int)
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |