Menüs nutzen nun ENTER statt SPACE, kleines Bugfix im GameOver- und GamePausedScreen.
This commit is contained in:
parent
4fa7db8e6b
commit
8089702e4a
@ -60,32 +60,32 @@ public class GameOverScreen extends Screen {
|
||||
i.next().update();
|
||||
}
|
||||
|
||||
if(this.colorValueIncrease){
|
||||
if(this.colorValueIncrease) {
|
||||
this.colorValue += 2;
|
||||
if(this.colorValue > 70) this.colorValueIncrease = false;
|
||||
}else{
|
||||
} else {
|
||||
this.colorValue -= 2;
|
||||
if(this.colorValue < -70) this.colorValueIncrease = true;
|
||||
}
|
||||
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_DOWN)){
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_DOWN) && this.animationStatus == 0){
|
||||
this.menuPoint = 1;
|
||||
player.setPosition(player.getX(), 409);
|
||||
}
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_UP)){
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_UP) && this.animationStatus == 0){
|
||||
this.menuPoint = 0;
|
||||
player.setPosition(player.getX(), 309);
|
||||
}
|
||||
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_SPACE)) {
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER)) {
|
||||
this.animationStatus = 1;
|
||||
}
|
||||
if(this.animationStatus == 1){
|
||||
if(player.getX() <= GameConfig.windowWidth){
|
||||
player.setPosition(player.getX() + (int)playerMoveSpeed, player.getY());
|
||||
if(this.animationStatus == 1) {
|
||||
if(player.getX() <= GameConfig.windowWidth) {
|
||||
player.setPosition(player.getX() + (int) playerMoveSpeed, player.getY());
|
||||
playerMoveSpeed += 0.1;
|
||||
}else this.animationStatus = 2;
|
||||
}else if(this.animationStatus == 2){
|
||||
} else this.animationStatus = 2;
|
||||
} else if(this.animationStatus == 2) {
|
||||
switch (this.menuPoint) {
|
||||
case 0:
|
||||
this.parent.setOverlay(new GameScreen(this.parent));
|
||||
|
@ -60,32 +60,32 @@ public class GamePausedScreen extends Screen {
|
||||
i.next().update();
|
||||
}
|
||||
|
||||
if(this.colorValueIncrease){
|
||||
if(this.colorValueIncrease) {
|
||||
this.colorValue += 2;
|
||||
if(this.colorValue > 70) this.colorValueIncrease = false;
|
||||
}else{
|
||||
} else {
|
||||
this.colorValue -= 2;
|
||||
if(this.colorValue < -70) this.colorValueIncrease = true;
|
||||
}
|
||||
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_DOWN)){
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_DOWN) && this.animationStatus == 0) {
|
||||
this.menuPoint = 1;
|
||||
player.setPosition(player.getX(), 409);
|
||||
}
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_UP)){
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_UP) && this.animationStatus == 0) {
|
||||
this.menuPoint = 0;
|
||||
player.setPosition(player.getX(), 309);
|
||||
}
|
||||
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_SPACE)) {
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER)) {
|
||||
this.animationStatus = 1;
|
||||
}
|
||||
if(this.animationStatus == 1){
|
||||
if(player.getX() <= GameConfig.windowWidth){
|
||||
if(this.animationStatus == 1) {
|
||||
if(player.getX() <= GameConfig.windowWidth) {
|
||||
player.setPosition(player.getX() + (int)playerMoveSpeed, player.getY());
|
||||
playerMoveSpeed += 0.1;
|
||||
}else this.animationStatus = 2;
|
||||
}else if(this.animationStatus == 2){
|
||||
} else this.animationStatus = 2;
|
||||
} else if(this.animationStatus == 2) {
|
||||
switch (this.menuPoint) {
|
||||
case 0:
|
||||
this.parent.setOverlay(null);
|
||||
|
@ -65,40 +65,40 @@ public class MainMenuScreen extends Screen {
|
||||
i.next().update();
|
||||
}
|
||||
|
||||
if(colorValueIncrease){
|
||||
if(colorValueIncrease) {
|
||||
colorValue += 2;
|
||||
if(colorValue > 70) colorValueIncrease = false;
|
||||
}else{
|
||||
} else {
|
||||
colorValue -= 2;
|
||||
if(colorValue < -70) colorValueIncrease = true;
|
||||
}
|
||||
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_DOWN) && !keyPressed && animationStatus == 0){
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_DOWN) && !keyPressed && animationStatus == 0) {
|
||||
keyPressed = true;
|
||||
if(menuPoint<4){
|
||||
menuPoint++;
|
||||
player.setPosition(player.getX(), 209+(menuPoint*75));
|
||||
}
|
||||
}else if(Keyboard.isKeyDown(KeyEvent.VK_UP) && !keyPressed && animationStatus == 0){
|
||||
} else if(Keyboard.isKeyDown(KeyEvent.VK_UP) && !keyPressed && animationStatus == 0) {
|
||||
keyPressed = true;
|
||||
if(menuPoint>0){
|
||||
if(menuPoint>0) {
|
||||
menuPoint--;
|
||||
player.setPosition(player.getX(), 209+(menuPoint*75));
|
||||
}
|
||||
}else if(!Keyboard.isKeyDown(KeyEvent.VK_DOWN) && !Keyboard.isKeyDown(KeyEvent.VK_UP)){
|
||||
} else if(!Keyboard.isKeyDown(KeyEvent.VK_DOWN) && !Keyboard.isKeyDown(KeyEvent.VK_UP)) {
|
||||
keyPressed = false;
|
||||
}
|
||||
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_SPACE)) {
|
||||
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER)) {
|
||||
animationStatus = 1;
|
||||
}
|
||||
|
||||
if(animationStatus == 1){
|
||||
if(player.getX() <= GameConfig.windowWidth){
|
||||
player.setPosition(player.getX() + (int)playerMoveSpeed, player.getY());
|
||||
if(animationStatus == 1) {
|
||||
if(player.getX() <= GameConfig.windowWidth) {
|
||||
player.setPosition(player.getX() + (int) playerMoveSpeed, player.getY());
|
||||
playerMoveSpeed += 0.1;
|
||||
}else animationStatus = 2;
|
||||
}else if(animationStatus == 2){
|
||||
} else animationStatus = 2;
|
||||
} else if(animationStatus == 2) {
|
||||
switch (menuPoint) {
|
||||
case 0:
|
||||
this.parent.setOverlay(new GameScreen(this.parent));
|
||||
|
Loading…
x
Reference in New Issue
Block a user