Ejemplo n.º 1
0
        void Start()
        {
            defaultFog        = RenderSettings.fogColor;
            nightFog          = new Color(defaultFog.r * 0.05f, defaultFog.g * 0.05f, defaultFog.b * 0.05f, 1f);
            defaultFogDensity = RenderSettings.fogDensity;

            CloudMaterial.SetFloat("_CloudSpeed", 0.03f);
            StarMaterial.SetFloat("_Exposure", 2.0f);

            WeatherSource.CurrentWeatherState  = WeatherState.LoadFromXML(WeatherSource.XMLWeatherStatePath + "PSWS_FALLBACK");
            WeatherSource.NextWeatherState     = null;
            WeatherSource.WeatherStateBlending = 0;

            StartCoroutine(WeatherSource.WeatherStateChanger());
            StartCoroutine(WeatherSource.UpdateCloudRenderTex());
            StartCoroutine(ReflectionProbeUpdater.UpdateProbe());
        }
Ejemplo n.º 2
0
 void OnDisable()
 {
     StopCoroutine(WeatherSource.WeatherStateChanger());
     StopCoroutine(WeatherSource.UpdateCloudRenderTex());
     StopCoroutine(ReflectionProbeUpdater.UpdateProbe());
 }