diff --git a/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin b/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin index 271b283..c75c815 100644 Binary files a/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin and b/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin differ diff --git a/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.lock b/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.lock index c184486..70833cb 100644 Binary files a/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.lock and b/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.lock differ diff --git a/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.bin b/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.bin index bf36bd3..d32a166 100644 Binary files a/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.bin and b/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.bin differ diff --git a/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.lock b/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.lock index 6d2c09f..5c59044 100644 Binary files a/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.lock and b/Happy_Bird/.gradle/7.1.1/fileHashes/fileHashes.lock differ diff --git a/Happy_Bird/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/Happy_Bird/.gradle/buildOutputCleanup/buildOutputCleanup.lock index d6567d0..26ce0c9 100644 Binary files a/Happy_Bird/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/Happy_Bird/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/Happy_Bird/build/classes/java/main/com/example/happy_bird/HappyBirdMain.class b/Happy_Bird/build/classes/java/main/com/example/happy_bird/HappyBirdMain.class index e762818..75d55ec 100644 Binary files a/Happy_Bird/build/classes/java/main/com/example/happy_bird/HappyBirdMain.class and b/Happy_Bird/build/classes/java/main/com/example/happy_bird/HappyBirdMain.class differ diff --git a/Happy_Bird/build/libs/Happy_Bird-1.0-SNAPSHOT.jar b/Happy_Bird/build/libs/Happy_Bird-1.0-SNAPSHOT.jar index 81949f2..dd74a80 100644 Binary files a/Happy_Bird/build/libs/Happy_Bird-1.0-SNAPSHOT.jar and b/Happy_Bird/build/libs/Happy_Bird-1.0-SNAPSHOT.jar differ diff --git a/Happy_Bird/build/resources/main/com/example/happy_bird/pics/Oldbird.png b/Happy_Bird/build/resources/main/com/example/happy_bird/pics/Oldbird.png deleted file mode 100644 index f05baa3..0000000 Binary files a/Happy_Bird/build/resources/main/com/example/happy_bird/pics/Oldbird.png and /dev/null differ diff --git a/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin b/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin index 7c8d14d..74625c0 100644 Binary files a/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin and b/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/Happy_Bird/src/main/java/com/example/happy_bird/HappyBirdMain.java b/Happy_Bird/src/main/java/com/example/happy_bird/HappyBirdMain.java index 607f8b6..d3f49e0 100644 --- a/Happy_Bird/src/main/java/com/example/happy_bird/HappyBirdMain.java +++ b/Happy_Bird/src/main/java/com/example/happy_bird/HappyBirdMain.java @@ -733,32 +733,17 @@ public class HappyBirdMain extends Application { */ birdPositionMovedBy = 0; scene.setOnKeyPressed(event -> { - /*if (event.getCode() == KeyCode.S) { - moveBirdDown(); - System.out.println(birdPositionMovedBy); - }*/ - - // FUNKTIONIERT - // aktuelle birdPositionMovedBy rausfid - - - /*if (event.getCode() == KeyCode.W) { + if (event.getCode() == KeyCode.W) { moveBirdUp(); } if (event.getCode() == KeyCode.S) { moveBirdDown(); - }*/ + } - if (event.getCode() == KeyCode.W) { - moveBirdUp(); - } - else { - moveBirdDown(); - } - if (event.getCode() == KeyCode.ESCAPE && !menuScreenRunning) { - pauseButtonClick(this.gameRunning); - this.gameRunning = !this.gameRunning; + if (event.getCode() == KeyCode.ESCAPE && !menuScreenRunning) { + pauseButtonClick(this.gameRunning); + this.gameRunning = !this.gameRunning; } }); @@ -1199,6 +1184,7 @@ public class HappyBirdMain extends Application { generateMenueScreen(); } + // Aufstieg dauert immer länger private void moveBirdUp() { velocity = (float) -4.5; var pos = velocity += gravity; @@ -1206,7 +1192,7 @@ public class HappyBirdMain extends Application { happyBird.setLayoutY(birdPositionMovedBy); } - // Soll Automatisch runter fallen + // Fall geht schneller private void moveBirdDown() { var pos = velocity -= gravity; birdPositionMovedBy -= pos;