Package studio.magemonkey.fabled.thread
Class ThreadTask
java.lang.Object
studio.magemonkey.fabled.thread.ThreadTask
- All Implemented Interfaces:
Runnable,IThreadTask
A task that runs ones and is finished
-
Constructor Summary
ConstructorsConstructorDescriptionSets up the task to run on the next thread iterationThreadTask(int delay) Sets up the task to run after a delay -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface studio.magemonkey.fabled.thread.IThreadTask
run
-
Constructor Details
-
ThreadTask
public ThreadTask()Sets up the task to run on the next thread iteration -
ThreadTask
public ThreadTask(int delay) Sets up the task to run after a delay- Parameters:
delay- delay in ticks
-
-
Method Details
-
tick
public boolean tick()Ticks the task, running it if applicable- Specified by:
tickin interfaceIThreadTask- Returns:
- true after the task runs, false beforehand
-