uk.ac.ic.doc.game
Class DelayedTimerListener

java.lang.Object
  extended by uk.ac.ic.doc.game.DelayedTimerListener
All Implemented Interfaces:
ITimerListener

public abstract class DelayedTimerListener
extends java.lang.Object
implements ITimerListener

Adapter for the ITimerListener interface that notifies every time a specific duration of time has passed.


Constructor Summary
DelayedTimerListener(double delay)
          Creates a DelayedTimerListener that will notify every time delay seconds of time have passed.
 
Method Summary
abstract  void onTimerTick()
          Called every time the duration determined by the delay value used to construct this object passes.
 void onTimerTick(double delay)
          Implementation of ITimerListener method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelayedTimerListener

public DelayedTimerListener(double delay)
Creates a DelayedTimerListener that will notify every time delay seconds of time have passed.

Parameters:
delay - The duration in seconds that must pass between notifications.
Method Detail

onTimerTick

public void onTimerTick(double delay)
Implementation of ITimerListener method.

Specified by:
onTimerTick in interface ITimerListener
Parameters:
delay - The duration since the last timer tick in seconds.

onTimerTick

public abstract void onTimerTick()
Called every time the duration determined by the delay value used to construct this object passes.