feat: game pause
This commit is contained in:
parent
61ba24da75
commit
cc3b005ae7
|
@ -276,6 +276,14 @@ export default class GameLevel extends Scene {
|
||||||
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
|
||||||
let playerAI = (<PlayerController>this.player.ai);
|
let playerAI = (<PlayerController>this.player.ai);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user