From fbd83aa34e1b1963045560de98581d1c809b80c4 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Tue, 16 Dec 2014 12:16:28 +0100 Subject: [PATCH] Remove menu from GameWonScreen, this is one way only. --- .gitignore | 3 +-- save | 20 ------------------ .../spacescooter/screen/GameWonScreen.java | 21 ++++--------------- 3 files changed, 5 insertions(+), 39 deletions(-) delete mode 100644 save diff --git a/.gitignore b/.gitignore index 1550851..7778cf1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,4 @@ bin compiled game.jar - -./Highscore +Highscore diff --git a/save b/save deleted file mode 100644 index 0900f7b..0000000 --- a/save +++ /dev/null @@ -1,20 +0,0 @@ -200 Name -190 Name -180 Name -170 Name -160 Name -150 Name -140 Name -130 Name -120 Name -110 Name -100 Name -90 Name -80 Name -70 Name -60 Name -50 Name -40 Name -30 Name -20 Name -10 Name \ No newline at end of file diff --git a/src/de/teamteamteam/spacescooter/screen/GameWonScreen.java b/src/de/teamteamteam/spacescooter/screen/GameWonScreen.java index 23f9098..161778a 100644 --- a/src/de/teamteamteam/spacescooter/screen/GameWonScreen.java +++ b/src/de/teamteamteam/spacescooter/screen/GameWonScreen.java @@ -23,14 +23,12 @@ public class GameWonScreen extends Screen { private float playerMoveSpeed = 0; private int colorValue = 0; private boolean colorValueIncrease = true; - private int menuPoint = 0; private int animationStatus = 0; //0 = Noch nicht gestartet, 1 = Animation läuft, 2 = Animation beendet public GameWonScreen(Screen parent) { super(parent); this.img = Loader.getBufferedImageByFilename("images/pausebackground.png"); new Button(GameConfig.windowWidth/2-125, 300); - new Button(GameConfig.windowWidth/2-125, 400); player = new Player(GameConfig.windowWidth/2-170, 309); player.setCanMove(false); player.setCanShoot(false); @@ -65,15 +63,6 @@ public class GameWonScreen extends Screen { this.colorValue -= 2; if(this.colorValue < -70) this.colorValueIncrease = true; } - - if(Keyboard.isKeyDown(KeyEvent.VK_DOWN) && this.animationStatus == 0){ - this.menuPoint = 1; - player.setPosition(player.getX(), 409); - } - if(Keyboard.isKeyDown(KeyEvent.VK_UP) && this.animationStatus == 0){ - this.menuPoint = 0; - player.setPosition(player.getX(), 309); - } // make a selection if(Keyboard.isKeyDown(KeyEvent.VK_ENTER) || Keyboard.isKeyDown(KeyEvent.VK_SPACE)) { @@ -83,13 +72,11 @@ public class GameWonScreen extends Screen { 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) { - switch (this.menuPoint) { - case 0: - this.parent.setOverlay(new ShopScreen(this.parent)); - break; + } else { + this.animationStatus = 2; } + } else if(this.animationStatus == 2) { + this.parent.setOverlay(new ShopScreen(this.parent)); } }