diff --git a/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin b/Happy_Bird/.gradle/7.1.1/executionHistory/executionHistory.bin index 6182639..5bd77c9 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 c85d4ae..476ab47 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 daf9a2e..42b4912 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 065bf14..f42c16f 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 f72e6cc..918f82a 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/HappyBird.class b/Happy_Bird/build/classes/java/main/com/example/happy_bird/HappyBird.class index 77fe81c..778e13f 100644 Binary files a/Happy_Bird/build/classes/java/main/com/example/happy_bird/HappyBird.class and b/Happy_Bird/build/classes/java/main/com/example/happy_bird/HappyBird.class 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 23c97f5..ab916e9 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 519d322..24277f8 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/tmp/compileJava/previous-compilation-data.bin b/Happy_Bird/build/tmp/compileJava/previous-compilation-data.bin index 0f6607a..f4806cc 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 f7e9ebc..65ce4c7 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 @@ -29,8 +29,9 @@ public class HappyBirdMain extends Application { private Label acronymLabel = new Label("KÜRZEL"); private Label headline = new Label("HAPPY BIRD"); private Label soundLabel = new Label("SOUND"); - - private Label labels[] = {nameLabel, acronymLabel, soundLabel}; + private Label currentScoreLabel = new Label("SCORE"); + private Label highscoreLabel = new Label("HIGHSCORE"); + private Label labels[] = {nameLabel, acronymLabel, soundLabel, currentScoreLabel, highscoreLabel}; private Label headlineLabels[] = {headline}; private Button startButton = new Button("START"); @@ -78,21 +79,6 @@ public class HappyBirdMain extends Application { ); /**Hintergrund zu Pane hinzufügen:*/ -<<<<<<< HEAD - Image bird = new Image("file:src/main/resources/com/example/happy_bird/pics/bird.png", 50, 35, false, false); - /*ImageView birdView = new ImageView(); - birdView.setFitHeight(50); - birdView.setFitWidth(50); - birdView.setLayoutX(50); - birdView.setLayoutY(325); - - */ - - 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); - -======= ->>>>>>> 082839ae867a23cdf54af575f5daed906e6a0b6f Background background = new Background(backgroundImage); pane.setBackground(background); @@ -308,55 +294,28 @@ public class HappyBirdMain extends Application { public void startButtonClick() { headline.setText("START"); startGameButton.setOnAction(event -> { -<<<<<<< HEAD - for(TextField feld : inputFields) { - feld.setVisible(false); - } - for (Label label : labels ) - { - label.setVisible(false); - } - startGameButton.setVisible(false); - menuButton.setVisible(false); - headline.setVisible(false); - ImageView birdView = new ImageView(bird); - 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); -======= startGameButtonClick(); ->>>>>>> 082839ae867a23cdf54af575f5daed906e6a0b6f }); - for(Button button : buttons) { button.setVisible(false); - } startGameButton.setVisible(true); menuButton.setVisible(true); startGameButton.setLayoutY(520); - for(TextField feld : inputFields) { feld.setVisible(true); } for (Label label : labels ) { label.setVisible(true); } - + highscoreLabel.setVisible(false); + currentScoreLabel.setVisible(false); soundLabel.setVisible(false); + } + /*** * Hauptmenü wird ausgeblendet, Einstellungen folgen */ @@ -408,6 +367,7 @@ public class HappyBirdMain extends Application { * Startet Spiel nach Namenseingabe */ public void startGameButtonClick() { + nameLabel.setText("NAME: " + acronym.getText()); for(TextField feld : inputFields) { feld.setVisible(false); } @@ -422,6 +382,9 @@ public class HappyBirdMain extends Application { pane.getChildren().add(birdView); birdView.setLayoutY(325); birdView.setLayoutX(50); + nameLabel.setLayoutX(10); + nameLabel.setLayoutY(10); + nameLabel.setVisible(true); ImageView upperPipeView = new ImageView(upperPipe); pane.getChildren().add(upperPipeView); @@ -432,5 +395,12 @@ public class HappyBirdMain extends Application { pane.getChildren().add(lowerPipeView); lowerPipeView.setLayoutX(400); lowerPipeView.setLayoutY(430); + + currentScoreLabel.setLayoutX(540); + currentScoreLabel.setLayoutY(10); + currentScoreLabel.setVisible(true); + highscoreLabel.setLayoutX(540); + highscoreLabel.setLayoutY(70); + highscoreLabel.setVisible(true); } }