public void ClearAllPerfs()
 {
     PlayerPrefsUtil.DeleteKey(PlayerPrefsKey.BgMusicMuteKey);
     PlayerPrefsUtil.DeleteKey(PlayerPrefsKey.BgMusicVolKey);
     PlayerPrefsUtil.DeleteKey(PlayerPrefsKey.SoundFxMuteKey);
     PlayerPrefsUtil.DeleteKey(PlayerPrefsKey.SoundFxVolKey);
     PlayerPrefsUtil.Save();
 }
 public void SaveSoundEffectPrefs()
 {
     PlayerPrefsUtil.SetIntSimple(PlayerPrefsKey.SoundFxMuteKey, soundEffectOn?1:0);
     PlayerPrefsUtil.SetFloatSimple(PlayerPrefsKey.SoundFxVolKey, soundEffectVolume);
 }
 public void SaveBackgroundPrefs()
 {
     PlayerPrefsUtil.SetIntSimple(PlayerPrefsKey.BgMusicMuteKey, musicOn?1:0);
     PlayerPrefsUtil.SetFloatSimple(PlayerPrefsKey.BgMusicVolKey, musicVolume);
 }
 private bool LoadSoundEffectStatus()
 {
     return(PlayerPrefsUtil.HasKey(PlayerPrefsKey.SoundFxMuteKey)
         ? IntToBool(PlayerPrefsUtil.GetIntSimple(PlayerPrefsKey.SoundFxMuteKey))
         : soundEffectOn);
 }
 private bool LoadBackgroundStatus()
 {
     return(PlayerPrefsUtil.HasKey(PlayerPrefsKey.BgMusicMuteKey)
         ? IntToBool(PlayerPrefsUtil.GetIntSimple(PlayerPrefsKey.BgMusicMuteKey))
         : musicOn);
 }
 private float LoadSoundEffectVolume()
 {
     return(PlayerPrefsUtil.HasKey(PlayerPrefsKey.SoundFxVolKey)
         ? PlayerPrefsUtil.GetFloatSimple(PlayerPrefsKey.SoundFxVolKey)
         : soundEffectVolume);
 }
 /// <summary>
 /// 从本地数据获取如果没有返回musicVolume
 /// </summary>
 /// <returns></returns>
 private float LoadBackgroundVolume()
 {
     return(PlayerPrefsUtil.HasKey(PlayerPrefsKey.BgMusicVolKey)
         ? PlayerPrefsUtil.GetFloatSimple(PlayerPrefsKey.BgMusicVolKey)
         : musicVolume);
 }