phase 11 koncano
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user