Exemplo n.º 1
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();
     }
 }
Exemplo n.º 2
0
        public void ChooseAtmosphereSeriesRandomly()
        {
            ConfigAtmosphereSeries config = ConfigAtmosphereSeries.LoadFromFileAndDetach(AtmosphereSeriesData.GetPathRandomly());
            int sceneIdRandomly           = config.GetSceneIdRandomly();

            this.ChooseCloudScene(config, sceneIdRandomly);
        }