|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The RealTimeHandler interface describes an object that has to deal with a timer that controls time on a different scale. For instance, the timer may be controlling objects on a map that move over days, where days in the scenario time are represented by several seconds on the timer.
Method Summary | |
int |
getClockDirection()
Get whether time increases or decreases when the clock is run. |
int |
getPace()
Get the number of scenario units that pass when the timer updates within its interval. |
long |
getTime()
Get the current time value for the timer. |
int |
getUpdateInterval()
Get the timer interval, or how often the timer updates. |
void |
setClockDirection(int direction)
Set whether time increases or decreases when the clock is run. |
void |
setPace(int pace)
Set the number of scenario units that pass when the timer updates within its interval. |
void |
setTime(long time)
Set the current time value for the timer. |
void |
setUpdateInterval(int interval)
Set the timer interval, or how often the timer updates. |
void |
startClock()
Start the timer. |
void |
stepBackward()
Move the clock back one clock interval. |
void |
stepForward()
Move the clock forward one clock interval. |
void |
stopClock()
Stop the timer. |
Method Detail |
public void setUpdateInterval(int interval)
interval
- number of milliseconds between updates.public int getUpdateInterval()
public void setPace(int pace)
pace
- a number that means something to the
RealTimeHandler.public int getPace()
public void setTime(long time)
time
- public long getTime()
public void startClock()
public void stopClock()
public void setClockDirection(int direction)
public int getClockDirection()
public void stepForward()
public void stepBackward()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |