fixing some things

This commit is contained in:
ramapcsx2 2015-01-06 13:40:46 +01:00
parent ce668182ed
commit 1b64550114
4 changed files with 14 additions and 10 deletions

View File

@ -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());
}
}*/
}

View File

@ -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);
}

View File

@ -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

View File

@ -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();
}