Exemple #1
0
 protected override void OnStoping(WeatherSystem weatherSystem, float factor)
 {
     base.OnStoping(weatherSystem, factor);
     rainAmount = Mathf.LinearToGammaSpace(Mathf.Lerp(_rainAmount, 0, factor));
     weatherSystem.SetWeatherAmount(_rainAmount);
     UpdateRainWave(weatherSystem);
 }
Exemple #2
0
 protected override void OnStarting(WeatherSystem weatherSystem, float factor)
 {
     base.OnStarting(weatherSystem, factor);
     rainAmount += _rainSpeed * Time.deltaTime;
     weatherSystem.SetWeatherAmount(_rainAmount);
     UpdateRainWave(weatherSystem);
 }
Exemple #3
0
 protected override void OnClear(WeatherSystem weatherSystem)
 {
     _snowAmount = 0;
     weatherSystem.SetWeatherAmount(_snowAmount);
     if (weatherSystem.weatherType != WeatherType.Snow && weatherSystem.weatherType != WeatherType.Heavy_Snow)
     {
         weatherSystem._snowAmount = _snowAmount;
     }
 }
Exemple #4
0
    protected override void OnStoping(WeatherSystem weatherSystem, float factor)
    {
        var sunLight = weatherSystem.sunLight;

        sunLight.shadowStrength = Mathf.Lerp(sunLight.shadowStrength, weatherSystem.lightSource.shadowStrength, factor);

        snowAmount = Mathf.LinearToGammaSpace(Mathf.Lerp(_snowAmount, 0, factor));
        weatherSystem.SetWeatherAmount(_snowAmount);

        /*var bloom = Camera.main.GetComponent<UnityStandardAssets.ImageEffects.Bloom> ();
         * if(bloom!=null)
         *      bloom.bloomIntensity = factor * (weatherSystem.maxBloomIntensity - weatherSystem.minBloomIntensity) + weatherSystem.minBloomIntensity;*/
    }
Exemple #5
0
    protected override void OnStarting(WeatherSystem weatherSystem, float factor)
    {
        var sunLight = weatherSystem.sunLight;

        sunLight.shadowStrength = Mathf.Clamp01(Mathf.Lerp(sunLight.shadowStrength, weatherSystem.snowSkyIntensity, factor));
        snowAmount += _snowSpeed * Time.deltaTime;
        weatherSystem._snowAmount = snowAmount;
        weatherSystem.SetWeatherAmount(snowAmount);

        /*var bloom = Camera.main.GetComponent<UnityStandardAssets.ImageEffects.Bloom> ();
         * if(bloom!=null)
         *      bloom.bloomIntensity = (1-factor) * (weatherSystem.maxBloomIntensity - weatherSystem.minBloomIntensity) + weatherSystem.minBloomIntensity;*/
    }
Exemple #6
0
 protected override void OnRunning(WeatherSystem weatherSystem)
 {
     snowAmount += _snowSpeed * Time.deltaTime;
     weatherSystem._snowAmount = snowAmount;
     weatherSystem.SetWeatherAmount(snowAmount);
 }
Exemple #7
0
 protected override void OnClear(WeatherSystem weatherSystem)
 {
     rainAmount = 0;
     weatherSystem.SetWeatherAmount(_rainAmount);
 }
Exemple #8
0
 protected override void OnRunning(WeatherSystem weatherSystem)
 {
     UpdateRainWave(weatherSystem);
     weatherSystem.SetWeatherAmount(_rainAmount);
 }