/** Schedules a task to occur once after the specified delay. */ public Task scheduleTask (Task task, float delaySeconds) { return scheduleTask(task, delaySeconds, 0, 0); }
/** Schedules a task to occur once as soon as possible, but not sooner than the start of the next frame. */ public Task postTask (Task task) { return scheduleTask(task, 0, 0, 0); }
/** Schedules a task to occur once as soon as possible, but not sooner than the start of the next frame. */ public Task postTask (Task task) { return scheduleTask(task, 0, 0, 0); }
/** Schedules a task to occur once after the specified delay and then repeatedly at the specified interval until cancelled. */ public Task scheduleTask (Task task, float delaySeconds, float intervalSeconds) { return scheduleTask(task, delaySeconds, intervalSeconds, -1); }
/** Schedules a task to occur once after the specified delay. */ public Task scheduleTask (Task task, float delaySeconds) { return scheduleTask(task, delaySeconds, 0, 0); }
/** Schedules a task to occur once after the specified delay and then repeatedly at the specified interval until cancelled. */ public Task scheduleTask (Task task, float delaySeconds, float intervalSeconds) { return scheduleTask(task, delaySeconds, intervalSeconds, -1); }
/** Schedules a task on {@link #instance}. * @see #scheduleTask(Task, float, float) */ static public Task schedule (Task task, float delaySeconds, float intervalSeconds) { return instance().scheduleTask(task, delaySeconds, intervalSeconds); }
/** Schedules a task on {@link #instance}. * @see #scheduleTask(Task, float) */ static public Task schedule (Task task, float delaySeconds) { return instance().scheduleTask(task, delaySeconds); }
/** Schedules a task on {@link #instance}. * @see #scheduleTask(Task, float, float, int) */ static public Task schedule (Task task, float delaySeconds, float intervalSeconds, int repeatCount) { return instance().scheduleTask(task, delaySeconds, intervalSeconds, repeatCount); }
/** Schedules a task on {@link #instance}. * @see #scheduleTask(Task, float, float) */ static public Task schedule (Task task, float delaySeconds, float intervalSeconds) { return instance().scheduleTask(task, delaySeconds, intervalSeconds); }
/** Schedules a task on {@link #instance}. * @see #scheduleTask(Task, float, float, int) */ static public Task schedule (Task task, float delaySeconds, float intervalSeconds, int repeatCount) { return instance().scheduleTask(task, delaySeconds, intervalSeconds, repeatCount); }
/** Schedules a task on {@link #instance}. * @see #scheduleTask(Task, float) */ static public Task schedule (Task task, float delaySeconds) { return instance().scheduleTask(task, delaySeconds); }
@Override public void create () { Timer timer = new Timer(); Task task = timer.scheduleTask(new Task() { @Override public void run () { Gdx.app.log("TimerTest", "ping"); } }, 1, 1); Gdx.app.log("TimerTest","is task scheduled: "+String.valueOf(task.isScheduled())); } }
/** Schedules a task to occur once after the specified delay and then repeatedly at the specified interval until cancelled. */ public Task scheduleTask (Task task, float delaySeconds, float intervalSeconds) { return scheduleTask(task, delaySeconds, intervalSeconds, -1); }
/** Schedules a task to occur once as soon as possible, but not sooner than the start of the next frame. */ public Task postTask (Task task) { return scheduleTask(task, 0, 0, 0); }
/** Schedules a task on {@link #instance}. * @see #scheduleTask(Task, float, float) */ static public Task schedule (Task task, float delaySeconds, float intervalSeconds) { return instance().scheduleTask(task, delaySeconds, intervalSeconds); }
/** Schedules a task on {@link #instance}. * @see #scheduleTask(Task, float) */ static public Task schedule (Task task, float delaySeconds) { return instance().scheduleTask(task, delaySeconds); }
/** Schedules a task on {@link #instance}. * @see #scheduleTask(Task, float, float, int) */ static public Task schedule (Task task, float delaySeconds, float intervalSeconds, int repeatCount) { return instance().scheduleTask(task, delaySeconds, intervalSeconds, repeatCount); }
@Override public void changed(ChangeEvent event, Actor actor) { if (timerTask.isScheduled()) { timerTask.cancel(); } timer.scheduleTask(timerTask, threshold); } };
private void scheduleCurrentRepeatingKeyTask() { if (currentRepeatingKeyTask != null && !currentRepeatingKeyTask.isScheduled()) { keyRepeatTimer.scheduleTask( currentRepeatingKeyTask, keyRepeatStartDelays.get(currentRepeatingGdxKeyCode, DEFAULT_KEY_REPEAT_START_DELAY_SECONDS), keyRepeatRates.get(currentRepeatingGdxKeyCode, DEFAULT_KEY_REPEAT_RATE_SECONDS)); } }