fix texture reuse on run cycle restart + expose debug kill

- Remove existing tilemap/minimap textures before recreating (prevents
  "Texture key already in use" error on second run)
- Expose __game and __debugKill for dev console testing

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Денис Шкабатур
2026-02-12 15:22:49 +03:00
parent 56c96798e3
commit 3d4f710cb0
4 changed files with 20 additions and 3 deletions

View File

@@ -247,10 +247,15 @@ export class GameScene extends Phaser.Scene {
// 11. Launch UIScene overlay
this.scene.launch('UIScene');
// Transition from Awakening to Exploration after a moment
// Transition from Awakening to Exploration after a moment
this.time.delayedCall(500, () => {
advancePhase(this.runState); // Awakening → Exploration
});
// Debug: expose kill method for testing death cycle
(this as unknown as Record<string, unknown>).__debugKill = () => {
Health.current[this.playerEid] = 0;
};
}
/** Give the player their school's starting elements */