com.brackeen.javagamebook.scripting
Class GameTaskManager

java.lang.Object
  extended bycom.brackeen.javagamebook.scripting.GameTaskManager

public class GameTaskManager
extends java.lang.Object

Manages a queue of GameTask objects.


Constructor Summary
GameTaskManager()
          Creates a new GameTaskManager with a empty task queue.
 
Method Summary
 void addTask(GameTask task)
          Adds a task to the queue.
 void addTask(long delay, java.lang.Runnable runnable)
          Adds a task to the queue that exetued the specified runnable after a delay.
 void clear()
          Clears the task queue.
 void update(long elapsedTime)
          Updates this manager, executing any ready tasks.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameTaskManager

public GameTaskManager()
Creates a new GameTaskManager with a empty task queue.

Method Detail

addTask

public void addTask(long delay,
                    java.lang.Runnable runnable)
Adds a task to the queue that exetued the specified runnable after a delay.


addTask

public void addTask(GameTask task)
Adds a task to the queue.


clear

public void clear()
Clears the task queue.


update

public void update(long elapsedTime)
Updates this manager, executing any ready tasks.