|
|
@ -35,8 +35,8 @@ public class GameManager { |
|
|
|
} |
|
|
|
|
|
|
|
public void ProcessInput(char inputChar) { |
|
|
|
if(inputChar == 27) { |
|
|
|
//todo: escape key pauses game |
|
|
|
if(inputChar == 27) {// 27 = ESC |
|
|
|
TogglePause(); |
|
|
|
} |
|
|
|
else if (inputChar == 'w' || inputChar == 's' || inputChar == 'd' || inputChar == 'a') { |
|
|
|
player.processInput(inputChar); |
|
|
@ -68,5 +68,12 @@ public class GameManager { |
|
|
|
public void Unpause() { |
|
|
|
isPaused = false; |
|
|
|
} |
|
|
|
|
|
|
|
public void TogglePause() { |
|
|
|
if(isPaused) { |
|
|
|
Unpause(); |
|
|
|
} |
|
|
|
else { |
|
|
|
Pause(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |