From 4c6ccac9b9be6003cae2b1f6d33b26a548702987 Mon Sep 17 00:00:00 2001 From: David Kotnik Date: Sat, 3 Jan 2026 22:16:12 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=99=20Restored=20StoryScene=20Menu=20a?= =?UTF-8?q?s=20Default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed PreloadScene to start StoryScene (main menu) instead of DemoSceneEnhanced MENU FEATURES: ✅ New Game button ✅ Continue button ✅ Settings button ✅ Credits button ✅ All original game scenes accessible DemoSceneEnhanced still available via game menu. Back to normal game flow! 🎮 --- src/scenes/PreloadScene.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/scenes/PreloadScene.js b/src/scenes/PreloadScene.js index 936da4440..25f3a7258 100644 --- a/src/scenes/PreloadScene.js +++ b/src/scenes/PreloadScene.js @@ -394,21 +394,25 @@ class PreloadScene extends Phaser.Scene { percentText.destroy(); title.destroy(); zombie.destroy(); - bg.destroy(); + bg.destroy(); // Ensure bg is destroyed here + console.log('✅ PreloadScene: Assets loaded!'); + window.gameState.currentScene = 'PreloadScene'; + + // ✅ Starting main menu (StoryScene) + this.time.delayedCall(500, () => { + console.log('🎮 Starting StoryScene (Main Menu)...'); + this.scene.start('StoryScene'); // ← MAIN MENU + }); } }); }); } create() { - console.log('✅ PreloadScene: Assets loaded!'); - window.gameState.currentScene = 'PreloadScene'; - - // ✅ Starting DEMO SCENE ENHANCED! - this.time.delayedCall(500, () => { - console.log('🎮 Starting DemoSceneEnhanced...'); - this.scene.start('DemoSceneEnhanced'); // ← DEMO! - }); + // The actual scene start logic has been moved to the 'load.on(complete)' callback + // to ensure all assets are fully loaded and the loading bar has faded out. + // This 'create' method now primarily serves as a placeholder or for any + // immediate setup that doesn't depend on asset loading completion. } processPlayerSpritesheet() {