diff --git a/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin b/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin index d9cd6e6..112998b 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 3c5f0e4..2f8b613 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 9168148..a51f21c 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 2a0d5c7..ff56971 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 f457502..39f69f7 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 cb8da51..4f3bc2f 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 d71379c..9b89f66 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/bird.png b/Happy_Bird/build/resources/main/com/example/happy_bird/pics/bird.png new file mode 100644 index 0000000..5e8c4b9 Binary files /dev/null and b/Happy_Bird/build/resources/main/com/example/happy_bird/pics/bird.png differ diff --git a/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin b/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin index e027b08..ba876c5 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/GameScreen.java b/Happy_Bird/src/main/java/com/example/happy_bird/GameScreen.java new file mode 100644 index 0000000..5bf395f --- /dev/null +++ b/Happy_Bird/src/main/java/com/example/happy_bird/GameScreen.java @@ -0,0 +1,25 @@ +package com.example.happy_bird; + +import javafx.application.Application; +import javafx.event.ActionEvent; +import javafx.event.EventHandler; +import javafx.fxml.FXMLLoader; +import javafx.geometry.Insets; +import javafx.geometry.Pos; +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.control.Label; +import javafx.scene.control.TextField; +import javafx.scene.control.Slider; +import javafx.scene.image.*; +import javafx.scene.image.Image; +import javafx.scene.layout.*; +import javafx.scene.text.TextAlignment; +import javafx.stage.Stage; +import java.awt.*; +import java.io.IOException; + +public class GameScreen extends HappyBirdMain +{ + +} 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 1fe9dfd..77290d2 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 @@ -35,15 +35,25 @@ public class HappyBirdMain extends Application { stage.setScene(scene); //Backgroundimage - Image image = new Image("file:src/main/resources/com/example/happy_bird/pics/Background.png"); + Image backgroundImage = new Image("file:src/main/resources/com/example/happy_bird/pics/Background.png"); BackgroundImage backgroundImageImg = new BackgroundImage( - image, + backgroundImage, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT ); + Image bird = new Image("file:src/main/resources/com/example/happy_bird/pics/bird.png", 50, 50, false, false); + /*ImageView birdView = new ImageView(); + birdView.setFitHeight(50); + birdView.setFitWidth(50); + birdView.setLayoutX(50); + birdView.setLayoutY(325); + + */ + + Background background = new Background(backgroundImageImg); pane.setBackground(background); @@ -185,8 +195,22 @@ public class HappyBirdMain extends Application { }); - //startGame.setOnAction(event -> {}); - //startButton.setOnAction(event -> {}); + startGame.setOnAction(event -> { + for(TextField feld : inputFields) { + feld.setVisible(false); + } + for (Label label : startLabels ) + { + label.setVisible(false); + } + startGame.setVisible(false); + menuButton.setVisible(false); + headline.setVisible(false); + ImageView birdView = new ImageView(bird); + pane.getChildren().add(birdView); + birdView.setLayoutY(325); + birdView.setLayoutX(50); + }); diff --git a/Happy_Bird/src/main/resources/com/example/happy_bird/pics/bird.png b/Happy_Bird/src/main/resources/com/example/happy_bird/pics/bird.png new file mode 100644 index 0000000..5e8c4b9 Binary files /dev/null and b/Happy_Bird/src/main/resources/com/example/happy_bird/pics/bird.png differ