feat: expand space
This commit is contained in:
@@ -36,6 +36,8 @@ public class Tetris {
|
||||
}
|
||||
|
||||
public static void resetSpace() {
|
||||
if (gravityTask != null) gravityTask.cancel();
|
||||
timer.purge();
|
||||
space = new Space();
|
||||
}
|
||||
|
||||
@@ -54,9 +56,13 @@ public class Tetris {
|
||||
}
|
||||
|
||||
public static void stopGame() {
|
||||
gravityTask.cancel();
|
||||
if (gravityTask != null) gravityTask.cancel();
|
||||
timer.purge();
|
||||
if (ui.getMenuPanel() instanceof ScoreMenu) ((ScoreMenu) Tetris.ui.getMenuPanel()).gameOver();
|
||||
if (ui.getMenuPanel() instanceof ScoreMenu) ((ScoreMenu) ui.getMenuPanel()).gameOver();
|
||||
ui.transferFocus();
|
||||
}
|
||||
|
||||
public static void updateScore(int score) {
|
||||
if (ui.getMenuPanel() instanceof ScoreMenu) ((ScoreMenu) ui.getMenuPanel()).updateScore(score);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user