Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        Vector2      position = new Vector2(transform.position.x, transform.position.z);
        WeatherTypes weather  = weatherManager.GetWeather(position);

        outputText.text             = weather.ToString();
        selfRenderer.material.color = weather.ToColor();
    }
Esempio n. 2
0
    public static string GetWeatherDescription()
    {
        if (currentWeatherType == WeatherTypes.Alarming)
        {
            return("Alarming!");
        }
        if (currentWeatherType == WeatherTypes.Airy)
        {
            return("Airy");
        }
        if (currentWeatherType == WeatherTypes.Balmy)
        {
            return("Balmy");
        }
        if (currentWeatherType == WeatherTypes.Chilly)
        {
            return("Chilly");
        }
        if (currentWeatherType == WeatherTypes.Cloudy)
        {
            return("Cloudy");
        }
        if (currentWeatherType == WeatherTypes.Flurries)
        {
            return("Flurries");
        }
        if (currentWeatherType == WeatherTypes.Hot)
        {
            return("Hot");
        }
        if (currentWeatherType == WeatherTypes.LunarEclipse)
        {
            return("Lunar Eclipse!");
        }
        if (currentWeatherType == WeatherTypes.Muggy)
        {
            return("Muggy");
        }
        if (currentWeatherType == WeatherTypes.Raining)
        {
            return("Raining");
        }
        if (currentWeatherType == WeatherTypes.Snowing)
        {
            return("Snowing");
        }

        Debug.LogError("unknown weather type " + currentWeatherType.ToString());

        return("");
    }
Esempio n. 3
0
 private static string GetInfoMessage(WeatherTypes weather)
 {
     return($"Today is '{weather.ToString()}' you need '{GetShoes(weather)}', '{GetPants(weather)}'");
 }