com.asdf.common
Class GameTimerTask

java.lang.Object
  extended by java.util.TimerTask
      extended by com.asdf.common.GameTimerTask
All Implemented Interfaces:
java.lang.Runnable

public abstract class GameTimerTask
extends java.util.TimerTask

TimerTask wrapper, which synchronizes calling Game


Constructor Summary
GameTimerTask(Game game)
          Constructor
 
Method Summary
abstract  void onTick()
          Method that is called when the timer fires.
 void run()
          Run method that synchronizes game before calling onTick.
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameTimerTask

public GameTimerTask(Game game)
Constructor

Parameters:
game - Game used for synchronization
Method Detail

run

public void run()
Run method that synchronizes game before calling onTick.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask

onTick

public abstract void onTick()
Method that is called when the timer fires.