diff --git a/TODO.md b/TODO.md index 0e8f571..2847146 100644 --- a/TODO.md +++ b/TODO.md @@ -7,7 +7,6 @@ Phaser 3 migration * Pause the game when the window isn't focused (except in headless) * Fit the game in window size * Fix top-right messages positions -* Fix the character sheet layout * Fix valuebar requiring to be in root display list Menu/settings/saves @@ -89,7 +88,6 @@ Artificial Intelligence * If web worker is not responsive, or produces only errors, it should be disabled for the session * Produce interesting "angle" areas * Evaluate active effects -* Account for luck * Evaluators result should be more specific (final state evaluation, diff evaluation, confidence...) * Use a first batch of producers, and only if no "good" move has been found, go on with some infinite producers * Abandon fight if the AI judges there is no hope of victory diff --git a/src/MainUI.ts b/src/MainUI.ts index eba05a4..7b1f17e 100644 --- a/src/MainUI.ts +++ b/src/MainUI.ts @@ -125,9 +125,9 @@ module TK.SpaceTac { * Change the active scene */ goToScene(name: string): void { - this.scene.scenes.forEach(scene => { - if (this.scene.isActive(scene)) { - scene.shutdown(); + keys(this.scene.keys).forEach(key => { + if (this.scene.isActive(key) || this.scene.isVisible(key)) { + this.scene.stop(key); } }); this.scene.start(name);