|
@ -13,7 +13,7 @@ public class GameManager { |
|
|
player = new Player(this); |
|
|
player = new Player(this); |
|
|
ghosts = new Ghost[4]; |
|
|
ghosts = new Ghost[4]; |
|
|
for(int i = 0; i < ghosts.length; i++) { |
|
|
for(int i = 0; i < ghosts.length; i++) { |
|
|
ghosts[i] = new Ghost(); |
|
|
|
|
|
|
|
|
ghosts[i] = new Ghost(this); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -28,6 +28,12 @@ public class GameManager { |
|
|
if(inputChar == 27) { |
|
|
if(inputChar == 27) { |
|
|
//todo: escape key pauses game |
|
|
//todo: escape key pauses game |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
else if (inputChar == 'w' || inputChar == 's' || inputChar == 'd' || inputChar == 'a') { |
|
|
|
|
|
player.processInput(inputChar); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else { |
|
|
else { |
|
|
System.out.println("Unprocessed Input: " + inputChar + " (" + (int)inputChar + ")"); |
|
|
System.out.println("Unprocessed Input: " + inputChar + " (" + (int)inputChar + ")"); |
|
|
} |
|
|
} |
|
|