implemented all the good stuff in FlowOfTime.java
This commit is contained in:
parent
f728bd4667
commit
446b2b57f3
@ -6,8 +6,18 @@ import java.util.TimerTask;
|
|||||||
public class FlowOfTime extends Timer {
|
public class FlowOfTime extends Timer {
|
||||||
private TimerTask timeup;
|
private TimerTask timeup;
|
||||||
private long gametime;
|
private long gametime;
|
||||||
|
private Game game;
|
||||||
|
|
||||||
|
|
||||||
public void start() {
|
private class GameOver extends TimerTask {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
game.stopGame();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void start(long delay) {
|
||||||
|
schedule(new GameOver(), delay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user