Beispiel #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PlayerLevel != 0)
            {
                hash ^= PlayerLevel.GetHashCode();
            }
            if (WarningSeverity.Length != 0)
            {
                hash ^= WarningSeverity.GetHashCode();
            }
            if (WeatherTag.Length != 0)
            {
                hash ^= WeatherTag.GetHashCode();
            }
            if (MoonTag.Length != 0)
            {
                hash ^= MoonTag.GetHashCode();
            }
            if (TimeOfDayTag.Length != 0)
            {
                hash ^= TimeOfDayTag.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Beispiel #2
0
    public void SortWeather()
    {
        StopParticles();
        float randomWeather = Random.value;

        if (randomWeather > 0.9f)
        {
            currentWeather = WeatherTag.Snownny;
            snownnyParticle.Play();
        }
        else if (randomWeather > 0.7f)
        {
            currentWeather = WeatherTag.Rainy;
            rainyParticle.Play();
        }
        else
        {
            currentWeather = WeatherTag.Sunny;
        }
    }