public float GetMaxSeverity(WeatherInfo weatherType = null) { WeatherInfo _weatherType = weatherType ?? currentWeather; if (_weatherType == null) { return(0); } float maxSeverity = _weatherType.maxSeverity; if (_weatherType.weather.name == "Wind") { maxSeverity = WindStorm.GetMaxSeverity(maxSeverity); } else if (_weatherType.weather.name == "Fog") { Fog fog = _weatherType.weather.GetComponent <Fog>(); maxSeverity = fog.GetMaxSeverity(maxSeverity); } return(maxSeverity); }