make VK_SPACE an accepted select key
This commit is contained in:
parent
9a3ac5c9af
commit
a99bbcc274
@ -6,9 +6,9 @@ import de.teamteamteam.spacescooter.entity.shot.Shot;
|
|||||||
import de.teamteamteam.spacescooter.sound.SoundSystem;
|
import de.teamteamteam.spacescooter.sound.SoundSystem;
|
||||||
import de.teamteamteam.spacescooter.utility.Random;
|
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.
|
* 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 {
|
public abstract class Enemy extends ShootingEntity {
|
||||||
|
|
||||||
@ -41,6 +41,7 @@ public abstract class Enemy extends ShootingEntity {
|
|||||||
if(willShoot == true){
|
if(willShoot == true){
|
||||||
this.shoot();
|
this.shoot();
|
||||||
}
|
}
|
||||||
|
// ToDo: ???
|
||||||
if(this.getX() < 0-this.getWidth()) {
|
if(this.getX() < 0-this.getWidth()) {
|
||||||
this.remove();
|
this.remove();
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,8 @@ public class GameOverScreen extends Screen {
|
|||||||
player.setPosition(player.getX(), 309);
|
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;
|
this.animationStatus = 1;
|
||||||
}
|
}
|
||||||
if(this.animationStatus == 1) {
|
if(this.animationStatus == 1) {
|
||||||
|
@ -77,9 +77,11 @@ public class GamePausedScreen extends Screen {
|
|||||||
player.setPosition(player.getX(), 309);
|
player.setPosition(player.getX(), 309);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER)) {
|
// make a selection
|
||||||
this.animationStatus = 1;
|
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER) || Keyboard.isKeyDown(KeyEvent.VK_SPACE)) {
|
||||||
|
animationStatus = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.animationStatus == 1) {
|
if(this.animationStatus == 1) {
|
||||||
if(player.getX() <= GameConfig.windowWidth) {
|
if(player.getX() <= GameConfig.windowWidth) {
|
||||||
player.setPosition(player.getX() + (int)playerMoveSpeed, player.getY());
|
player.setPosition(player.getX() + (int)playerMoveSpeed, player.getY());
|
||||||
|
@ -88,7 +88,8 @@ public class MainMenuScreen extends Screen {
|
|||||||
keyPressed = false;
|
keyPressed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER)) {
|
// make a selection
|
||||||
|
if(Keyboard.isKeyDown(KeyEvent.VK_ENTER) || Keyboard.isKeyDown(KeyEvent.VK_SPACE)) {
|
||||||
animationStatus = 1;
|
animationStatus = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ public class ShopScreen extends Screen {
|
|||||||
this.player.setPosition(50, this.player.getY());
|
this.player.setPosition(50, this.player.getY());
|
||||||
this.player.setPosition(this.player.getX(), 159+(this.menuPoint*100));
|
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;
|
this.keyPressed = true;
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
switch (this.menuPoint) {
|
switch (this.menuPoint) {
|
||||||
|
Loading…
Reference in New Issue
Block a user