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