Exemplo n.º 1
0
 public static void Restart(Weather.WeatherTypes newWeather, int?newWeatherCycle = null)
 {
     currentWeather = newWeather;
     weatherCycle   = newWeatherCycle ?? Constants.WEATHER_CYCLE;
 }
Exemplo n.º 2
0
        public static Weather.WeatherTypes SuitableWeather(ScriptsNames script, Weather.WeatherTypes weather)
        {
            if (script == ScriptsNames.KoreanBoeing)
            {
                return(Weather.WeatherTypes.snow);
            }

            if (weather == Weather.WeatherTypes.good)
            {
                return(weather);
            }

            Weather.WeatherTypes weatherRainOrStorm = Weather.WeatherTypes.rain;
            if (FlyObject.rand.Next(2) == 0)
            {
                weatherRainOrStorm = Weather.WeatherTypes.storm;
            }

            if ((script != Scripts.ScriptsNames.DesertStorm) && (weather == Weather.WeatherTypes.sand))
            {
                return(Weather.WeatherTypes.good);
            }

            switch (script)
            {
            case ScriptsNames.Vietnam:
                return(weatherRainOrStorm);

            case ScriptsNames.IranIraq:
                return(Weather.WeatherTypes.good);

            case ScriptsNames.DesertStorm:
                return(Weather.WeatherTypes.sand);

            case ScriptsNames.Syria:
                return(Weather.WeatherTypes.good);

            case ScriptsNames.Yugoslavia:
                return(weather);

            case ScriptsNames.Libya:
                return(Weather.WeatherTypes.good);

            case ScriptsNames.Yemen:
                return(weatherRainOrStorm);

            case ScriptsNames.Rust:
                return(weather);

            case ScriptsNames.F117Hunt:
                return(weather);

            case ScriptsNames.Khmeimim:
                return(Weather.WeatherTypes.good);

            case ScriptsNames.Belgrad:
                return(weather);

            case ScriptsNames.Turkey:
                return(Weather.WeatherTypes.good);
            }
            ;

            return(weather);
        }