make VK_SPACE an accepted select key

This commit is contained in:
ramapcsx2 2014-11-29 14:07:40 +01:00
parent 9a3ac5c9af
commit a99bbcc274
5 changed files with 12 additions and 7 deletions

View File

@ -6,9 +6,9 @@ import de.teamteamteam.spacescooter.entity.shot.Shot;
import de.teamteamteam.spacescooter.sound.SoundSystem;
import de.teamteamteam.spacescooter.utility.Random;
/**
* The Enemy class that handle all the Enemies out there.
* The Enemy class that handles all the Enemies out there.
* Including bosses and minibosses.
* This class inherit all the properties of the enemies to every subclass
* This class inherits all the properties of the enemies to every subclass
*/
public abstract class Enemy extends ShootingEntity {
@ -41,6 +41,7 @@ public abstract class Enemy extends ShootingEntity {
if(willShoot == true){
this.shoot();
}
// ToDo: ???
if(this.getX() < 0-this.getWidth()) {
this.remove();
}

View File

@ -82,7 +82,8 @@ public class GameOverScreen extends Screen {
player.setPosition(player.getX(), 309);
}
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER)) {
// make a selection
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER) || Keyboard.isKeyDown(KeyEvent.VK_SPACE)) {
this.animationStatus = 1;
}
if(this.animationStatus == 1) {

View File

@ -77,9 +77,11 @@ public class GamePausedScreen extends Screen {
player.setPosition(player.getX(), 309);
}
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER)) {
this.animationStatus = 1;
// make a selection
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER) || Keyboard.isKeyDown(KeyEvent.VK_SPACE)) {
animationStatus = 1;
}
if(this.animationStatus == 1) {
if(player.getX() <= GameConfig.windowWidth) {
player.setPosition(player.getX() + (int)playerMoveSpeed, player.getY());

View File

@ -88,7 +88,8 @@ public class MainMenuScreen extends Screen {
keyPressed = false;
}
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER)) {
// make a selection
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER) || Keyboard.isKeyDown(KeyEvent.VK_SPACE)) {
animationStatus = 1;
}

View File

@ -70,7 +70,7 @@ public class ShopScreen extends Screen {
this.player.setPosition(50, this.player.getY());
this.player.setPosition(this.player.getX(), 159+(this.menuPoint*100));
}
}else if(Keyboard.isKeyDown(KeyEvent.VK_ENTER) && !this.keyPressed && this.animationStatus == 0) {
}else if ( (Keyboard.isKeyDown(KeyEvent.VK_ENTER) || Keyboard.isKeyDown(KeyEvent.VK_SPACE)) && !this.keyPressed && this.animationStatus == 0) {
this.keyPressed = true;
///////////////////////////////////////////////////////////////
switch (this.menuPoint) {