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 8f12286..7dc3187 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 @@ -62,8 +62,8 @@ public class HappyBirdMain extends Application { Image image = new Image("file:src/main/resources/com/example/happy_bird/pics/Background.png"); /**Hintergrund erstellen:*/ - BackgroundImage backgroundImageImg = new BackgroundImage( - backgroundImage, + BackgroundImage backgroundImage = new BackgroundImage( + image, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, @@ -83,7 +83,7 @@ public class HappyBirdMain extends Application { Image upperPipe = new Image("file:src/main/resources/com/example/happy_bird/pics/PipeOben.png", 86, 300, false, false); Image lowerPipe = new Image("file:src/main/resources/com/example/happy_bird/pics/PipeUnten.png", 86, 300, false, false); - Background background = new Background(backgroundImageImg); + Background background = new Background(backgroundImage); pane.setBackground(background); @@ -297,15 +297,15 @@ public class HappyBirdMain extends Application { */ public void startButtonClick() { headline.setText("START"); - startGame.setOnAction(event -> { + startGameButton.setOnAction(event -> { for(TextField feld : inputFields) { feld.setVisible(false); } - for (Label label : startLabels ) + for (Label label : labels ) { label.setVisible(false); } - startGame.setVisible(false); + startGameButton.setVisible(false); menuButton.setVisible(false); headline.setVisible(false); ImageView birdView = new ImageView(bird);