org.xith3d.loop
Class UpdaterImpl

java.lang.Object
  extended by org.xith3d.loop.UpdaterImpl
All Implemented Interfaces:
Updatable, Updater

public class UpdaterImpl
extends java.lang.Object
implements Updater, Updatable

This is the simplest possible implementation of Updater.


Constructor Summary
UpdaterImpl()
           
 
Method Summary
 void addUpdatable(Updatable updatable)
          Adds a new Updatable instance to the list, that is worked each frame.
 void removeUpdatable(Updatable updatable)
          Removes an Updatable instance from the list, that is worked each frame.
 void update(long gameTime, long frameTime, UpdatingThread.TimingMode timingMode)
          Updates this Updatable object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdaterImpl

public UpdaterImpl()
Method Detail

addUpdatable

public void addUpdatable(Updatable updatable)
Adds a new Updatable instance to the list, that is worked each frame. This is like adding a ScheduledOperation, that is infinitely alive and persistent.

Specified by:
addUpdatable in interface Updater

removeUpdatable

public void removeUpdatable(Updatable updatable)
Removes an Updatable instance from the list, that is worked each frame.

Specified by:
removeUpdatable in interface Updater

update

public void update(long gameTime,
                   long frameTime,
                   UpdatingThread.TimingMode timingMode)
Updates this Updatable object.

Specified by:
update in interface Updatable
Parameters:
gameTime - the gameTime in Milliseconds
frameTime - the frameTime in Milliseconds (needed time for the last frame)
timingMode - the TimingMode to use for frameTime.