Exemplo n.º 1
0
        public void ChooseAtmosphereSeriesRandomly()
        {
            ConfigAtmosphereSeries config = ConfigAtmosphereSeries.LoadFromFileAndDetach(AtmosphereSeriesData.GetPathRandomly());
            int sceneIdRandomly           = config.GetSceneIdRandomly();

            this.ChooseCloudScene(config, sceneIdRandomly);
        }
Exemplo n.º 2
0
        public static ConfigAtmosphereSeries LoadFromFileAndDetach(string path)
        {
            ConfigAtmosphereSeries series = UnityEngine.Object.Instantiate <ConfigAtmosphereSeries>(ConfigUtil.LoadConfig <ConfigAtmosphereSeries>(path));

            series.InitAfterLoad();
            series._path = path;
            return(series);
        }
Exemplo n.º 3
0
        public static ConfigAtmosphereSeries LoadFromFile(string path)
        {
            ConfigAtmosphereSeries series = ConfigUtil.LoadConfig <ConfigAtmosphereSeries>(path);

            series.InitAfterLoad();
            series._path = path;
            return(series);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
 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();
     }
 }