public DustManager( SunOrbit orb, Persistence.Game game, Persistence.Base @base, SurvivalTimer timer, Func <IEnumerator, Coroutine> startCoroutine, Action <Coroutine> stopCoroutine) { survivalTimer = timer; survivalTimer.OnPlayerInHabitatChange += _OnPlayerInHabitatChange; orb.OnSolChange += _OnSolChange; orb.OnHourChange += _OnHourChange; orb.OnDawn += _OnDawn; orb.OnDusk += _OnDusk; DuskAndDawnOnlyParent = orb.DuskAndDawnOnlyParent; environment = game.Environment; this.random = new System.Random(@base.WeatherSeed); this.startCoroutine = startCoroutine; this.stopCoroutine = stopCoroutine; FastForward(environment.CurrentSol); DoAfterSolChange(); if (environment.CurrentHour > 12) { AnnounceForecast(); } else { #if UNITY_EDITOR AnnounceForecast(); #endif } refreshSolarPanels(); }
void Awake() { Instance = this; }