Exemplo n.º 1
0
    public static string IceBreaker(WeatherManager.Weather weather)
    {
        switch (weather)
        {
        case WeatherManager.Weather.RAIN:
            return("sure is rainy today!");

        case WeatherManager.Weather.SNOW:
            return("man, it's cold out!");

        case WeatherManager.Weather.SUN:
            return("nice day, huh?");

        default:
            return("");
        }
    }
Exemplo n.º 2
0
    public void UpdateWeatherIcon(WeatherManager.Weather newWeather)
    {
        switch (newWeather)
        {
        case WeatherManager.Weather.Sunny:
            weatherImage.sprite           = sunnyWeather;
            temperatureEffectImage.sprite = null;
            break;

        case WeatherManager.Weather.Rainy:
            weatherImage.sprite           = rainyWeather;
            temperatureEffectImage.sprite = temperatureDecrease;
            break;

        case WeatherManager.Weather.Rocky:
            weatherImage.sprite           = rockyWeather;
            temperatureEffectImage.sprite = null;
            break;

        case WeatherManager.Weather.Icy:
            weatherImage.sprite           = icyWeather;
            temperatureEffectImage.sprite = temperatureDecrease;
            break;

        case WeatherManager.Weather.Heat:
            weatherImage.sprite           = heatWeather;
            temperatureEffectImage.sprite = temperatureIncrease;
            break;

        default:
            weatherImage.sprite           = sunnyWeather;
            temperatureEffectImage.sprite = null;
            break;
        }

        weatherAnimation.Play(impactClip.name);
    }