File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ public class GameScreen extends Screen {
3737 private static final int SCREEN_CHANGE_INTERVAL = 1500 ;
3838 /** Height of the interface separation line. */
3939 private static final int SEPARATION_LINE_HEIGHT = 40 ;
40+ /** Difficulty settings for level 1. */
41+ private static final GameSettings RESTART_SETTING =
42+ new GameSettings (5 , 4 , 60 , 2000 );
4043
4144 /** Current game difficulty settings. */
4245 private GameSettings gameSettings ;
@@ -72,7 +75,7 @@ public class GameScreen extends Screen {
7275 private boolean bonusLife ;
7376 /** Pause Screen */
7477 private Screen pausescreen ;
75-
78+ /** Title Screen */
7679 private Screen titlescreen ;
7780 /** Check if game is pause */
7881 private boolean isPause ;
@@ -310,6 +313,9 @@ else if (this.returnCode == 7) {
310313 this .level = 1 ;
311314 this .score = 0 ;
312315 this .lives = 3 ;
316+ this .bulletsShot = 0 ;
317+ this .shipsDestroyed = 0 ;
318+ this .gameSettings = RESTART_SETTING ;
313319 initialize ();
314320 this .logger .info ("Restart" );
315321 this .isPause = false ;
You can’t perform that action at this time.
0 commit comments