コード例 #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();
    }
コード例 #2
0
ファイル: GameState.cs プロジェクト: johnfn/rep-air
    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("");
    }
コード例 #3
0
 private static string GetInfoMessage(WeatherTypes weather)
 {
     return($"Today is '{weather.ToString()}' you need '{GetShoes(weather)}', '{GetPants(weather)}'");
 }