phase 11 koncano

This commit is contained in:
2025-12-08 14:01:41 +01:00
parent 07f0752d81
commit f3d476e843
21 changed files with 1503 additions and 200 deletions

View File

@@ -71,8 +71,26 @@ class WeatherSystem {
if (phase !== this.currentPhase) {
this.currentPhase = phase;
console.log(`🌅 Time of Day: ${phase} (${Math.floor(this.gameTime)}:00)`);
// Trigger Bat Swarm at Dusk
if (phase === 'dusk' && this.scene.worldEventSystem) {
this.scene.worldEventSystem.spawnBatSwarm();
}
}
// Trigger Night Owl at Midnight (00:00)
// We check if seconds crossed 0.
if (Math.abs(this.gameTime - 0.0) < 0.05) {
// Only trigger once per night - check active flag or similar?
// Actually, gameTime will pass 0 very quickly but maybe multiple frames.
// We can use a flag resetting at day.
if (!this.owlTriggered && this.scene.worldEventSystem) {
this.scene.worldEventSystem.spawnNightOwl();
this.owlTriggered = true;
}
}
if (this.gameTime > 5) this.owlTriggered = false; // Reset flag at dawn
// Update UI Clock
const uiScene = this.scene.scene.get('UIScene');
if (uiScene && uiScene.clockText) {