Example #1
0
        private bool OnShowThunderWeatherNotify()
        {
            MainMenuStage          component = base.view.transform.GetComponent <MainMenuStage>();
            ConfigAtmosphereSeries config    = ConfigAtmosphereSeries.LoadFromFileAndDetach("Rendering/MainMenuAtmosphereConfig/Lightning");

            component.ChooseCloudScene(config, 0);
            UserLocalDataItem localData = Singleton <MiHoYoGameData> .Instance.LocalData;

            localData.StartDirtyCheck();
            if ((localData.CurrentWeatherConfigPath != "Rendering/MainMenuAtmosphereConfig/Lightning") || (localData.CurrentWeatherSceneID != 0))
            {
                localData.SetDirty();
            }
            localData.CurrentWeatherConfigPath = "Rendering/MainMenuAtmosphereConfig/Lightning";
            localData.CurrentWeatherSceneID    = 0;
            if (localData.EndDirtyCheck())
            {
                Singleton <MiHoYoGameData> .Instance.Save();
            }
            return(false);
        }
Example #2
0
        private bool OnShowRandomWeatherNotify()
        {
            string pathRandomly           = AtmosphereSeriesData.GetPathRandomly();
            ConfigAtmosphereSeries config = ConfigAtmosphereSeries.LoadFromFileAndDetach(pathRandomly);
            int sceneIdRandomly           = config.GetSceneIdRandomly();

            base.view.transform.GetComponent <MainMenuStage>().ChooseCloudScene(config, sceneIdRandomly);
            UserLocalDataItem localData = Singleton <MiHoYoGameData> .Instance.LocalData;

            localData.StartDirtyCheck();
            if ((localData.CurrentWeatherConfigPath != pathRandomly) || (localData.CurrentWeatherSceneID != sceneIdRandomly))
            {
                localData.SetDirty();
            }
            localData.CurrentWeatherConfigPath = pathRandomly;
            localData.CurrentWeatherSceneID    = sceneIdRandomly;
            if (localData.EndDirtyCheck())
            {
                Singleton <MiHoYoGameData> .Instance.Save();
            }
            return(false);
        }
Example #3
0
 private void InitUserLocalData()
 {
     this._userLocalData = new UserLocalDataItem();
     this.Save();
 }