feat: game pause
This commit is contained in:
parent
61ba24da75
commit
cc3b005ae7
|
@ -272,9 +272,17 @@ export default class GameLevel extends Scene {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.gameStateStack.peek() === GameState.STORY) {
|
if (this.gameStateStack.peek() === GameState.STORY) {
|
||||||
if (InputWrapper.isNextJustPressed() && this.gameStateStack.peek() === GameState.STORY) {
|
if (InputWrapper.isNextJustPressed() && this.gameStateStack.peek() === GameState.STORY) {
|
||||||
this.updateStory();
|
this.updateStory();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (InputWrapper.isPauseJustPressed()) {
|
||||||
|
if (this.gameStateStack.peek() === GameState.GAMING) {
|
||||||
|
this.setGameState(GameState.PAUSE);
|
||||||
|
}
|
||||||
|
else if (this.gameStateStack.peek() === GameState.PAUSE) {
|
||||||
|
this.setGameState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//update health UI
|
//update health UI
|
||||||
|
|
Loading…
Reference in New Issue
Block a user