public WeatherZone(game_weather weather) { MapId = weather.zone; SetupSeasons(weather); CurrentWeather = WeatherType.WEATHER_TYPE_FINE; Intensity = 0.0f; }
private void SetupSeasons(game_weather weather) { var summer = new Season() { RainChance = weather.summer_rain_chance, SnowChance = weather.summer_snow_chance, StormChance = weather.summer_storm_chance }; var fall = new Season() { RainChance = weather.fall_rain_chance, SnowChance = weather.fall_snow_chance, StormChance = weather.fall_storm_chance }; var winter = new Season() { RainChance = weather.winter_rain_chance, SnowChance = weather.winter_snow_chance, StormChance = weather.winter_storm_chance }; var spring = new Season() { RainChance = weather.spring_rain_chance, SnowChance = weather.spring_snow_chance, StormChance = weather.spring_storm_chance }; Seasons = new Dictionary<WeatherSeason, Season>(); Seasons[WeatherSeason.Summer] = summer; Seasons[WeatherSeason.Winter] = winter; Seasons[WeatherSeason.Spring] = spring; Seasons[WeatherSeason.Fall] = fall; }