public void UpdateWeatherData(float time) { GlobalProperty.UpdateByTime(time); Ambient.UpdateByTime(time); Skybox.UpdateByTime(time); Particle.UpdateByTime(time); }
public void AfterPlayWeather() { GlobalProperty.DisableKeywords(); UpdateWeatherData(1); foreach (var pair in m_weatherControlDataDict) { pair.Value.EnableBehaviours(pair.Key == WeatherName); } }
public void PlayWeather(string weatherName, System.Action completeCallback = null) { Stop(); WeatherName = weatherName; WeatherControlData data = GetWeatherControlData(weatherName); data.EnableBehaviours(true); Particle.InitData(data.ParticleData, this.transform); GlobalProperty.InitData(data.GlobalPropertyData); Skybox.InitData(data.SkyboxData); Ambient.InitData(data.AmbientData, data.TimeData, m_weatherEffect, m_mainLight); m_coroutine = StartCoroutine(PlayWeather_Coroutine(completeCallback)); }
/// <summary> /// Sets a uniform for all shaders that contain this property. /// <para>Any future-initialized shaders will also have this uniform set.</para> /// </summary> /// <param name="property">The uniform.</param> /// <param name="value">The uniform value.</param> public static void Set <T>(GlobalProperty property, T value) where T : struct => ((UniformMapping <T>)global_properties[(int)property]).UpdateValue(ref value);
private string getEncodedProperty(string type, string key) { return(Base64.decodeToString(GlobalProperty.getProperty(type, key))); }
public void BeforePlayWeather() { GlobalProperty.EnableKeywords(); UpdateWeatherData(0); Particle.Play(); }