Pipes einfügen

This commit is contained in:
Mats Pape 2021-11-29 10:28:26 +01:00
parent 6626bcc35b
commit 2670617bfb
9 changed files with 12 additions and 0 deletions

View File

@ -53,6 +53,8 @@ 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);
pane.setBackground(background);
@ -210,6 +212,16 @@ public class HappyBirdMain extends Application {
pane.getChildren().add(birdView);
birdView.setLayoutY(325);
birdView.setLayoutX(50);
ImageView upperPipeView = new ImageView(upperPipe);
pane.getChildren().add(upperPipeView);
upperPipeView.setLayoutX(400);
upperPipeView.setLayoutY(0);
ImageView lowerPipeView = new ImageView(lowerPipe);
pane.getChildren().add(lowerPipeView);
lowerPipeView.setLayoutX(400);
lowerPipeView.setLayoutY(430);
});