Skip to content
Snippets Groups Projects
Commit 229d58ca authored by Paolo.Brasolin's avatar Paolo.Brasolin
Browse files

fix: #fe reset typewriter on game over

parent 4df82232
No related branches found
No related tags found
No related merge requests found
......@@ -357,6 +357,7 @@ export default class FightScene extends Phaser.Scene {
this.foes.forEach((foe) => foe.destroy());
this.sound.play("sfx_game_over");
this.typewriter.setActive(false);
this.typewriter.resetInputStatus();
this.scene.start("game_over", { music: this.music });
}
......
......@@ -199,7 +199,6 @@ class Typewriter {
if (this.inputStatus.began_at_gmtm === null)
this.inputStatus.began_at_gmtm = this.getGameTime();
if (key === Key.Enter) {
this.keyboard.clearInput();
this.inputStatus.typed += "\n";
this.inputStatus.ended_at = new Date();
this.inputStatus.ended_at_gmtm = this.getGameTime();
......@@ -222,6 +221,7 @@ class Typewriter {
}
resetInputStatus() {
this.keyboard.clearInput();
this.inputStatus = {
began_at: null,
ended_at: null,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment