🔙 Restored StoryScene Menu as Default
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! 🎮
This commit is contained in:
@@ -394,21 +394,25 @@ class PreloadScene extends Phaser.Scene {
|
|||||||
percentText.destroy();
|
percentText.destroy();
|
||||||
title.destroy();
|
title.destroy();
|
||||||
zombie.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() {
|
create() {
|
||||||
console.log('✅ PreloadScene: Assets loaded!');
|
// The actual scene start logic has been moved to the 'load.on(complete)' callback
|
||||||
window.gameState.currentScene = 'PreloadScene';
|
// 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
|
||||||
// ✅ Starting DEMO SCENE ENHANCED!
|
// immediate setup that doesn't depend on asset loading completion.
|
||||||
this.time.delayedCall(500, () => {
|
|
||||||
console.log('🎮 Starting DemoSceneEnhanced...');
|
|
||||||
this.scene.start('DemoSceneEnhanced'); // ← DEMO!
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processPlayerSpritesheet() {
|
processPlayerSpritesheet() {
|
||||||
|
|||||||
Reference in New Issue
Block a user