void LunarCircle() { // check if it's time for lunar change if (cityScript.Get_time() > timeForNextLunarCircle) { cityScript.Lunar_Cycle_Update(); // the function update the ressources values CreateOrNotADisaster(); timeForNextLunarCircle = cityScript.Get_time() + timeOfALunarCircle; } }
private void Start() { cityScript = cityGameObject.GetComponent <CityShems>(); timeForNextLunarCircle = cityScript.Get_time() + timeOfALunarCircle; my_disasters = canvaDisaster.GetComponentsInChildren <Disaster_Aure>(); }