From 1b64550114cbcec1f37d2173f2506b58fcd985dc Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Tue, 6 Jan 2015 13:40:46 +0100 Subject: [PATCH] fixing some things --- .../spacescooter/control/Keyboard.java | 15 +++++++++------ .../teamteamteam/spacescooter/entity/Player.java | 5 +++-- .../spacescooter/screen/GameWonScreen.java | 2 +- .../teamteamteam/spacescooter/utility/Loader.java | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/de/teamteamteam/spacescooter/control/Keyboard.java b/src/de/teamteamteam/spacescooter/control/Keyboard.java index 0b507ad..6ff055a 100644 --- a/src/de/teamteamteam/spacescooter/control/Keyboard.java +++ b/src/de/teamteamteam/spacescooter/control/Keyboard.java @@ -1,17 +1,19 @@ package de.teamteamteam.spacescooter.control; -import java.awt.Point; +// commented imports are for cheatcodes only. removed for release build + +/* import java.awt.Point; */ import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.util.ArrayList; -import de.teamteamteam.spacescooter.entity.enemy.EnemyBoss; +/* import de.teamteamteam.spacescooter.entity.enemy.EnemyBoss; import de.teamteamteam.spacescooter.entity.enemy.EnemyFour; import de.teamteamteam.spacescooter.entity.enemy.EnemyOne; import de.teamteamteam.spacescooter.entity.enemy.EnemyThree; import de.teamteamteam.spacescooter.entity.enemy.EnemyTwo; import de.teamteamteam.spacescooter.entity.item.ItemNuke; -import de.teamteamteam.spacescooter.screen.GameScreen; +import de.teamteamteam.spacescooter.screen.GameScreen; */ /** * This is our main control input source. @@ -105,8 +107,9 @@ public class Keyboard implements KeyListener { for(KeyboardListener kl : Keyboard.listener) kl.keyPressed(e); //Debug Spawn Enemy on Press or Items - //TODO: Remove the Code when game is ready - if(e.getKeyCode() == KeyEvent.VK_1) { + //Remove the Code when game is ready + + /*if(e.getKeyCode() == KeyEvent.VK_1) { new EnemyOne(400,400); } if(e.getKeyCode() == KeyEvent.VK_2) { @@ -129,7 +132,7 @@ public class Keyboard implements KeyListener { } if(e.getKeyCode() == KeyEvent.VK_5) { GameScreen.getPlayer().setCollide(!GameScreen.getPlayer().canCollide()); - } + }*/ } diff --git a/src/de/teamteamteam/spacescooter/entity/Player.java b/src/de/teamteamteam/spacescooter/entity/Player.java index 7377ede..682e64d 100644 --- a/src/de/teamteamteam/spacescooter/entity/Player.java +++ b/src/de/teamteamteam/spacescooter/entity/Player.java @@ -122,9 +122,10 @@ public class Player extends ShootingEntity implements KeyboardListener { */ @Override public void paint(Graphics2D g) { + // Todo: add blink effect if(this.currentCollisionCooldown > 0) { - g.setColor(Color.RED); - g.drawRect(this.getX(), this.getY(), this.getImageWidth(), this.getImageHeight()); + //g.setColor(Color.RED); + //g.drawRect(this.getX(), this.getY(), this.getImageWidth(), this.getImageHeight()); } super.paint(g); } diff --git a/src/de/teamteamteam/spacescooter/screen/GameWonScreen.java b/src/de/teamteamteam/spacescooter/screen/GameWonScreen.java index 161778a..c15fc80 100644 --- a/src/de/teamteamteam/spacescooter/screen/GameWonScreen.java +++ b/src/de/teamteamteam/spacescooter/screen/GameWonScreen.java @@ -46,7 +46,7 @@ public class GameWonScreen extends Screen { g.drawString("You win!", GameConfig.windowWidth/2-210, 200); g.setFont(new Font("Monospace", 0, 20)); g.setColor(new Color(0, 0, 0)); - g.drawString("Weiter", GameConfig.windowWidth/2-70, 332); + g.drawString("Weiter", GameConfig.windowWidth/2-30, 332); } @Override diff --git a/src/de/teamteamteam/spacescooter/utility/Loader.java b/src/de/teamteamteam/spacescooter/utility/Loader.java index d344270..7b4c694 100644 --- a/src/de/teamteamteam/spacescooter/utility/Loader.java +++ b/src/de/teamteamteam/spacescooter/utility/Loader.java @@ -137,7 +137,7 @@ public class Loader { loadingScreen.increaseCurrentProcessed(); //For the retro :D try { - Thread.sleep(Random.nextInt(15)); + Thread.sleep(Random.nextInt(10)); } catch (InterruptedException e1) { e1.printStackTrace(); }