ESC-Probleme für Pause behoben
This commit is contained in:
1 parent
1a7e6d45c6
commit
4108d5047f
1 file changed
+9
-4
@@ -42,7 +42,12 @@ public class KeyBindings extends KeyAdapter {
|
||||
down = false;
|
||||
break;
|
||||
case KeyEvent.VK_ESCAPE:
|
||||
//esc = false;
|
||||
if ( key ) {
|
||||
esc = false;
|
||||
} else {
|
||||
esc = true;
|
||||
}
|
||||
break;
|
||||
case KeyEvent.VK_A:
|
||||
key = false;
|
||||
@@ -78,9 +83,9 @@ public class KeyBindings extends KeyAdapter {
|
||||
case KeyEvent.VK_DOWN:
|
||||
down = true;
|
||||
break;
|
||||
case KeyEvent.VK_ESCAPE:
|
||||
esc = true;
|
||||
break;
|
||||
// case KeyEvent.VK_ESCAPE:
|
||||
// esc = true;
|
||||
// break;
|
||||
case KeyEvent.VK_A:
|
||||
if(((MapGrid.getGridCell(Main.player01.getGridLocation().x, Main.player01.getGridLocation().y).isTrigger()
|
||||
&& !HardewareManipulate.getHardware(MapGrid.getGridCell(Main.player01.getGridLocation().x, Main.player01.getGridLocation().y).getCorrespondingHardwareToTrigger()))&&!key)&&ActionControl.getKeyA()){
|
||||
@@ -190,8 +195,8 @@ public class KeyBindings extends KeyAdapter {
|
||||
player.animate = true;
|
||||
}
|
||||
if (isESC()) {
|
||||
System.out.println("ESC pressed.");
|
||||
Main.pause();
|
||||
esc=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user