|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nankin.zheng.gatem.util.GameTimer
A timer used in the game. For example, when pacman eats a big bean, all the timers of fantomes will be started, and will count for a period of time, during which the fantomes are blue and thus weak.
Field Summary | |
private int |
alarmLine
|
private int |
current
|
private int |
max
|
Constructor Summary | |
GameTimer(int max)
Constructor, set the max value of timer. |
Method Summary | |
void |
count()
Count one. |
boolean |
isAlarming()
whether is alarming. |
boolean |
isTimeUp()
whether time is up |
void |
reset()
Reset timer. |
void |
setAlarmLine(double percent)
Set alarm line. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int max
private int current
private int alarmLine
Constructor Detail |
public GameTimer(int max)
Method Detail |
public void setAlarmLine(double percent)
public void reset()
public void count()
public boolean isAlarming()
public boolean isTimeUp()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |