Pipes einfügen
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user