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); }
protected override void OnStarting(WeatherSystem weatherSystem, float factor) { base.OnStarting(weatherSystem, factor); rainAmount += _rainSpeed * Time.deltaTime; weatherSystem.SetWeatherAmount(_rainAmount); UpdateRainWave(weatherSystem); }
protected override void OnClear(WeatherSystem weatherSystem) { _snowAmount = 0; weatherSystem.SetWeatherAmount(_snowAmount); if (weatherSystem.weatherType != WeatherType.Snow && weatherSystem.weatherType != WeatherType.Heavy_Snow) { weatherSystem._snowAmount = _snowAmount; } }
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;*/ }
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;*/ }
protected override void OnRunning(WeatherSystem weatherSystem) { snowAmount += _snowSpeed * Time.deltaTime; weatherSystem._snowAmount = snowAmount; weatherSystem.SetWeatherAmount(snowAmount); }
protected override void OnClear(WeatherSystem weatherSystem) { rainAmount = 0; weatherSystem.SetWeatherAmount(_rainAmount); }
protected override void OnRunning(WeatherSystem weatherSystem) { UpdateRainWave(weatherSystem); weatherSystem.SetWeatherAmount(_rainAmount); }