kliene Änderung
This commit is contained in:
commit
680a80d210
@ -95,7 +95,7 @@ public class HappyBirdMain extends Application {
|
|||||||
private final Slider soundSliderPause = new Slider();
|
private final Slider soundSliderPause = new Slider();
|
||||||
|
|
||||||
/*Bilder*/
|
/*Bilder*/
|
||||||
private final Image bird = new Image("file:src/main/resources/com/example/happy_bird/pics/bird.png", 50, 35, false, false);
|
private final Image bird = new Image("file:src/main/resources/com/example/happy_bird/pics/bird.png", 45, 30, false, false);
|
||||||
|
|
||||||
private final Image pipeTop = new Image("file:src/main/resources/com/example/happy_bird/pics/PipeTop.png");
|
private final Image pipeTop = new Image("file:src/main/resources/com/example/happy_bird/pics/PipeTop.png");
|
||||||
private final Image pipeBottom = new Image("file:src/main/resources/com/example/happy_bird/pics/PipeBottom.png");
|
private final Image pipeBottom = new Image("file:src/main/resources/com/example/happy_bird/pics/PipeBottom.png");
|
||||||
@ -111,16 +111,13 @@ public class HappyBirdMain extends Application {
|
|||||||
|
|
||||||
private TranslateTransition top;
|
private TranslateTransition top;
|
||||||
private TranslateTransition bottom;
|
private TranslateTransition bottom;
|
||||||
|
private TranslateTransition birdTransition;
|
||||||
|
|
||||||
private Timeline timeline;
|
private Timeline timeline;
|
||||||
private final ArrayList<Transition> transitions = new ArrayList<Transition>();;
|
private final ArrayList<Transition> transitions = new ArrayList<Transition>();;
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
|
||||||
launch(args);
|
launch(args);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -143,7 +140,6 @@ public class HappyBirdMain extends Application {
|
|||||||
startGameButtonClick();
|
startGameButtonClick();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
stage.show();
|
stage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,17 +157,18 @@ public class HappyBirdMain extends Application {
|
|||||||
Rectangle topPipe = new Rectangle(900, y, 91, 500);
|
Rectangle topPipe = new Rectangle(900, y, 91, 500);
|
||||||
|
|
||||||
/* Pipe unten; spawnt auf der gleichen Höhe wie obere Pipe
|
/* Pipe unten; spawnt auf der gleichen Höhe wie obere Pipe
|
||||||
* +400, da y-Koord die untere linke Ecke ist
|
* +400 +250, für Abstand zwischen oberer Pipe und unterer Pipe */
|
||||||
* +250, der Abstand zwischen oberer Pipe und unterer Pipe */
|
|
||||||
Rectangle bottomPipe = new Rectangle(900, y + 400 + 250, 91, 500);
|
Rectangle bottomPipe = new Rectangle(900, y + 400 + 250, 91, 500);
|
||||||
|
|
||||||
/* oberer Pipe ein Hintergrundbild geben */
|
/* oberer Pipe ein Hintergrundbild geben */
|
||||||
Image img = new Image("file:src/main/resources/com/example/happy_bird/pics/PipeTop.png");
|
Image img = new Image("file:src/main/resources/com/example/happy_bird/pics/PipeTop.png");
|
||||||
topPipe.setFill(new ImagePattern(pipeTop));
|
topPipe.setFill(new ImagePattern(pipeTop));
|
||||||
|
topPipe.setStyle("-fx-view-order: 1");
|
||||||
|
|
||||||
/* unterer Pipe ein Hintergrundbild geben */
|
/* unterer Pipe ein Hintergrundbild geben */
|
||||||
img = new Image("file:src/main/resources/com/example/happy_bird/pics/PipeBottom.png");
|
img = new Image("file:src/main/resources/com/example/happy_bird/pics/PipeBottom.png");
|
||||||
bottomPipe.setFill(new ImagePattern(pipeBottom));
|
bottomPipe.setFill(new ImagePattern(pipeBottom));
|
||||||
|
bottomPipe.setStyle("-fx-view-order: 1");
|
||||||
|
|
||||||
/* neue Animationen über TranslateTransitions */
|
/* neue Animationen über TranslateTransitions */
|
||||||
top = new TranslateTransition();
|
top = new TranslateTransition();
|
||||||
|
Loading…
Reference in New Issue
Block a user