Unnötige Variable entfernt

This commit is contained in:
Mats Pape 2022-02-09 14:02:01 +01:00
parent 635aef047a
commit d835ec3460
9 changed files with 9 additions and 10 deletions

View File

@ -29,9 +29,6 @@ public class HappyBirdMain extends Application {
/* Formatierungsklasse */
private final FormatingClass formatingClass = new FormatingClass();
/* Testen des Endscreens */
private final Button endscreenTest = new Button("Endscreentest");
/* Datenbank einlesen */
private final MariaDB datenbank = new MariaDB();
@ -712,14 +709,12 @@ public class HappyBirdMain extends Application {
}
});
/*ESC-Tast drücken, um das Pause-Menü aufzurufen*/
scene.setOnKeyPressed(e -> {
if (e.getCode() == KeyCode.ESCAPE && !menuScreenRunning) {
pauseButtonClick(gameRunning);
gameRunning = !gameRunning;
}
});
/* ESC-Taste zum Öffnen des Pause-Screens einbinden -
* Tasten W und S einbinden zum Verändern der Höhe des Vogels
* (W bewegt den Vogel hoch / S bewegt den Vogel runter)
*/
birdPositionMovedBy = 0;
scene.setOnKeyPressed(event -> {
if (event.getCode() == KeyCode.S) {
@ -730,6 +725,10 @@ public class HappyBirdMain extends Application {
moveBirdUp();
System.out.println(birdPositionMovedBy);
}
if (event.getCode() == KeyCode.ESCAPE && !menuScreenRunning) {
pauseButtonClick(gameRunning);
gameRunning = !gameRunning;
}
});
} else {