kleine Änderungen
This commit is contained in:
parent
e818be6c17
commit
1cd92601e1
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.
@ -106,6 +106,8 @@ public class HappyBirdMain extends Application {
|
||||
//gameRunning: das Spiel läuft/ GameScreen ist aufgerufen
|
||||
private boolean gameRunning;
|
||||
|
||||
//Birdview
|
||||
ImageView birdView = new ImageView(bird);
|
||||
|
||||
private TranslateTransition top;
|
||||
private TranslateTransition bottom;
|
||||
@ -348,7 +350,6 @@ public class HappyBirdMain extends Application {
|
||||
menuButton.setVisible(false);
|
||||
|
||||
/*Vogel hinzufügen, bisher nur als Bild*/
|
||||
ImageView birdView = new ImageView(bird);
|
||||
pane.getChildren().add(birdView);
|
||||
birdView.setLayoutY(325);
|
||||
birdView.setLayoutX(50);
|
||||
@ -568,6 +569,8 @@ public class HappyBirdMain extends Application {
|
||||
if (correctName() && correctAcronym())
|
||||
{
|
||||
generateGameScreen();
|
||||
System.out.println(gameRunning);
|
||||
|
||||
|
||||
/*Klick auf den Pause-Button, um das Pause-Menü aufzurufen*/
|
||||
pauseButton.setOnAction(event -> {
|
||||
@ -584,8 +587,6 @@ public class HappyBirdMain extends Application {
|
||||
gameRunning = !gameRunning;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
System.out.println("Name oder Kürzel falsch!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -828,20 +829,20 @@ public class HappyBirdMain extends Application {
|
||||
String nametext = name.getText();
|
||||
if (!nametext.matches("[a-zA-ZÄÖÜäöüß ]*"))
|
||||
{
|
||||
System.out.println("Fehler Schreibweise Name");
|
||||
System.out.println("Fehler Schreibweise Name - nicht erlaubte Zeichen");
|
||||
return false;
|
||||
}
|
||||
if (nametext.length() > 0)
|
||||
{
|
||||
if (nametext.charAt(0) < 'A' || nametext.charAt(0) > 'Z')
|
||||
{
|
||||
System.out.println("Fehler Schreibweise Name 1. Buchstabe");
|
||||
System.out.println("Fehler Schreibweise Name - 1. Buchstabe muss großgeschrieben werden");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("Name leer");
|
||||
System.out.println("Name darf nicht leer sein");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -858,12 +859,12 @@ public class HappyBirdMain extends Application {
|
||||
System.out.println(acronymtext);
|
||||
if (acronymtext.length() < 3 || acronymtext.length() > 10)
|
||||
{
|
||||
System.out.println("Fehler Länge Kürzel");
|
||||
System.out.println("Fehler Länge Kürzel (3-10 Zeichen)");
|
||||
return false;
|
||||
}
|
||||
if (!acronymtext.matches("[A-Za-z0-9]*"))
|
||||
{
|
||||
System.out.println("Fehler Schreibweise Kürzel");
|
||||
System.out.println("Fehler Schreibweise Kürzel - nur Buchstaben und Zahlen erlaubt");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -986,4 +987,5 @@ public class HappyBirdMain extends Application {
|
||||
pane.getChildren().remove(endScreen);
|
||||
generateMenueScreen();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user