public void ChooseAtmosphereSeriesRandomly() { ConfigAtmosphereSeries config = ConfigAtmosphereSeries.LoadFromFileAndDetach(AtmosphereSeriesData.GetPathRandomly()); int sceneIdRandomly = config.GetSceneIdRandomly(); this.ChooseCloudScene(config, sceneIdRandomly); }
public static ConfigAtmosphereSeries LoadFromFileAndDetach(string path) { ConfigAtmosphereSeries series = UnityEngine.Object.Instantiate <ConfigAtmosphereSeries>(ConfigUtil.LoadConfig <ConfigAtmosphereSeries>(path)); series.InitAfterLoad(); series._path = path; return(series); }
public static ConfigAtmosphereSeries LoadFromFile(string path) { ConfigAtmosphereSeries series = ConfigUtil.LoadConfig <ConfigAtmosphereSeries>(path); series.InitAfterLoad(); series._path = path; return(series); }
public void ChooseAtmosphereSeriesDefault() { string str = "Rendering/MainMenuAtmosphereConfig/Default"; bool flag = Singleton <PlayerModule> .Instance.playerData.userId != 0; string path = !flag ? str : Singleton <MiHoYoGameData> .Instance.LocalData.CurrentWeatherConfigPath; ConfigAtmosphereSeries config = ConfigAtmosphereSeries.LoadFromFileAndDetach(path); int sceneId = !flag ? 0 : Singleton <MiHoYoGameData> .Instance.LocalData.CurrentWeatherSceneID; this.ChooseCloudScene(config, sceneId); }
public void ChooseCloudScene(ConfigAtmosphereSeries config, int sceneId) { if ((config != null) && config.IsValid()) { this._atmosphereConfigSeries = config; this.AtmosphereConfigSeriesPath = config.Path; int num = this.AtmosphereConfigSeriesPath.LastIndexOf('/'); string str = this.AtmosphereConfigSeriesPath.Substring(num + 1); this._atmosphereConfigSeriesId = AtmosphereSeriesData.GetId(this.AtmosphereConfigSeriesPath); this._atmosphereConfigSeries.SetSceneId(sceneId); this._currentKey = this.AtmosphereConfigSeries.KeyBeforeTime(this.DayTime); this._nextKey = this._currentKey; this._atmosphereConfig = this.AtmosphereConfigSeries.Value(this._currentKey); this._needUpdateAtmosphere = true; this.IsInTransition = false; this.ReleaseBackgroundRenderTexture(); this._cloudEmitter.gameObject.SetActive(true); this.UpdateAtmosphere(); } }