združen time in weather
This commit is contained in:
@@ -87,9 +87,10 @@ class GameScene extends Phaser.Scene {
|
||||
this.setupCamera();
|
||||
|
||||
// Initialize Time & Stats
|
||||
console.log('⏳ Initializing Time & Stats...');
|
||||
this.timeSystem = new TimeSystem(this);
|
||||
this.timeSystem.create();
|
||||
// Initialize Weather System (Unified: Time + DayNight + Weather)
|
||||
console.log('🌦️ Initializing Unified Weather System...');
|
||||
this.weatherSystem = new WeatherSystem(this);
|
||||
this.timeSystem = this.weatherSystem; // Alias for compatibility with other systems (e.g. UIScene, Farming)
|
||||
|
||||
this.statsSystem = new StatsSystem(this);
|
||||
this.inventorySystem = new InventorySystem(this);
|
||||
@@ -97,13 +98,7 @@ class GameScene extends Phaser.Scene {
|
||||
this.farmingSystem = new FarmingSystem(this);
|
||||
this.buildingSystem = new BuildingSystem(this);
|
||||
|
||||
// Initialize Weather System
|
||||
console.log('🌦️ Initializing Weather System...');
|
||||
this.weatherSystem = new WeatherSystem(this);
|
||||
|
||||
// Initialize Day/Night Cycle
|
||||
console.log('🌅 Initializing Day/Night System...');
|
||||
this.dayNightSystem = new DayNightSystem(this, this.timeSystem);
|
||||
// DayNightSystem removed (merged into WeatherSystem)
|
||||
|
||||
// Initialize Sound Manager
|
||||
console.log('🎵 Initializing Sound Manager...');
|
||||
@@ -198,11 +193,11 @@ class GameScene extends Phaser.Scene {
|
||||
|
||||
update(time, delta) {
|
||||
// Update Systems
|
||||
if (this.timeSystem) this.timeSystem.update(delta);
|
||||
// TimeSystem update removed (handled by WeatherSystem)
|
||||
if (this.statsSystem) this.statsSystem.update(delta);
|
||||
if (this.interactionSystem) this.interactionSystem.update(delta);
|
||||
if (this.farmingSystem) this.farmingSystem.update(delta);
|
||||
if (this.dayNightSystem) this.dayNightSystem.update();
|
||||
// DayNight update removed (handled by WeatherSystem)
|
||||
if (this.weatherSystem) this.weatherSystem.update(delta);
|
||||
|
||||
// Update Parallax (foreground grass fading)
|
||||
|
||||
Reference in New Issue
Block a user