|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunc.cdva.events.SingleEventSource<GameEventListener>
unc.cdva.gameengine.timer.GameTimer
public class GameTimer
The timer for the game, notifies listeners when it fires. Thus other objects can register this object and will be notified when the timer fires. The rate of this timer is the rate at which time logically progress for the game. Thus whenever this timer is fired, objects are moved according to how far they should move in the timer interval (which is how often the timer fires).
Field Summary |
---|
Fields inherited from class unc.cdva.events.SingleEventSource |
---|
listeners |
Constructor Summary | |
---|---|
GameTimer()
Initializes the game timer. |
Method Summary | |
---|---|
protected void |
notifyUpdate()
Notifies listeners when the timer fires. |
void |
start()
Starts the game timer. |
void |
stop()
Stops the game timer (but it may be restarted). |
Methods inherited from class unc.cdva.events.SingleEventSource |
---|
addListener, removeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GameTimer()
Method Detail |
---|
public void start()
public void stop()
protected void notifyUpdate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |