diff --git a/frontend/src/js/fight_scene.ts b/frontend/src/js/fight_scene.ts index 24ed26ac4a67d40efc200d4e3bc94382d26730f5..38c6741c8ac19f63c5e43c1ad175ba364853b0d0 100644 --- a/frontend/src/js/fight_scene.ts +++ b/frontend/src/js/fight_scene.ts @@ -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 }); } diff --git a/frontend/src/js/typewriter.ts b/frontend/src/js/typewriter.ts index 6af7b06cb2249c1fa6ba04c82d8b7f2fe6871132..dd97bb6b6a9e1476f47b1167bffc3ccfaf3e9ece 100644 --- a/frontend/src/js/typewriter.ts +++ b/frontend/src/js/typewriter.ts @@ -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,