Example #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);
 }
Example #2
0
 protected override void OnStarting(WeatherSystem weatherSystem, float factor)
 {
     base.OnStarting(weatherSystem, factor);
     rainAmount += _rainSpeed * Time.deltaTime;
     weatherSystem.SetWeatherAmount(_rainAmount);
     UpdateRainWave(weatherSystem);
 }
Example #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;
     }
 }
Example #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;*/
    }
Example #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;*/
    }
Example #6
0
 protected override void OnRunning(WeatherSystem weatherSystem)
 {
     snowAmount += _snowSpeed * Time.deltaTime;
     weatherSystem._snowAmount = snowAmount;
     weatherSystem.SetWeatherAmount(snowAmount);
 }
Example #7
0
 protected override void OnClear(WeatherSystem weatherSystem)
 {
     rainAmount = 0;
     weatherSystem.SetWeatherAmount(_rainAmount);
 }
Example #8
0
 protected override void OnRunning(WeatherSystem weatherSystem)
 {
     UpdateRainWave(weatherSystem);
     weatherSystem.SetWeatherAmount(_rainAmount);
 }