Class ThreadTask

java.lang.Object
studio.magemonkey.fabled.thread.ThreadTask
All Implemented Interfaces:
Runnable, IThreadTask

public abstract class ThreadTask extends Object implements IThreadTask
A task that runs ones and is finished
  • 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:
      tick in interface IThreadTask
      Returns:
      true after the task runs, false beforehand