private void GetUserSetting() { useMVC = PersistenceData.GetPrefsDataBool("CREATE_MODULE_USE_MVC"); string _creaters = PersistenceData.GetPrefsData("CREATE_MODULE_CREATER"); if (string.IsNullOrEmpty(_creaters)) { creaters = Developer.未知; } else { creaters = (Developer)System.Enum.Parse(typeof(Developer), _creaters); } }
private static void GetUserSetting() { wholeModule = PersistenceData.GetPrefsDataBool("ASSET_PACKAGER_WHOLE_MODULE"); string _v = RunningTimeData.GetRunningData(CommonKey.VERSION_LOCAL, "2.0.0.0"); version = new Version(_v); string _bu = DateTime.Now.ToString("MMdd"); buidle = int.Parse(_bu); if (buidle > version.Build) { buidle = 0; PersistenceData.SavePrefsData("LOCAL_VERSION_BUIDLE", buidle); } buidle = PersistenceData.GetPrefsDataInt("LOCAL_VERSION_BUIDLE", 0); }
public void Refresh() { bgm.mute = !PersistenceData.GetPrefsDataBool(CommonKey.SWITCH_MUSIC, true); bool _audio = !PersistenceData.GetPrefsDataBool(CommonKey.SWITCH_AUDIO, true); for (int i = 0; i < audios.Count; i++) { audios[i].mute = _audio; if (audios[i].isPlaying) { continue; } audios[i].clip = null; PoolModule.instance.Push("AUDIO_PLAYER", audios[i].gameObject); //UtilityUnity.DestroyGameObject(audios[i].gameObject); audios.RemoveAt(i); i--; } }
public void PlayAudio(AudioClip _audio) { AudioSource _as = null; GameObject _new = PoolModule.instance.Pop <GameObject>("AUDIO_PLAYER"); if (_new == null) { _new = new GameObject(_audio.name); _as = _new.AddComponent <AudioSource>(); } else { _new.SetActive(true); _as = _new.GetComponent <AudioSource>(); } UtilityUnity.SetParent(_new, autoListener); _as.clip = _audio; _as.mute = !PersistenceData.GetPrefsDataBool(CommonKey.SWITCH_AUDIO, true); _as.Play(); Refresh(); audios.Add(_as); }
private void GetUserSetting() { ComponentDataGetServer(); ComponentDataGetBundleIdentify(); //基础模块(针对业务逻辑) string _baseJson = RunningTimeData.GetRunningData("JSON_BASE_MODULE", string.Empty); if (!string.IsNullOrEmpty(_baseJson)) { baseModule = JsonMapper.ToObject <List <string> >(_baseJson); } //平台 bt = (MBuidleTarget)PersistenceData.GetPrefsDataInt("BUNDLE_PLANTFORM", 0); //是否debug版本 isDebug = PersistenceData.GetPrefsDataBool("BUNDLE_ISDEBUG", true); //全包含资源 isFull = PersistenceData.GetPrefsDataBool("BUNDLE_ISFULL", false); //分离体 buildDepartPackage = PersistenceData.GetPrefsDataBool("BUNDLE_ISDEPART", false); //不打新资源(不存在依然会打包资源) oldRes = PersistenceData.GetPrefsDataBool("BUNDLE_ISOLDRES", false); }