示例#1
0
 public static void ToggleSetting(Saving.SettingKey settingKey)
 {
     Saving.SaveSetting(settingKey, !Saving.LoadSetting(settingKey));
 }
示例#2
0
 public static bool LoadSetting(Saving.SettingKey settingKey)
 {
     return(PlayerPrefs.GetInt(settingKey.ToString(), 0) == 1);
 }
示例#3
0
 public static bool HasSetting(Saving.SettingKey settingKey)
 {
     return(PlayerPrefs.HasKey(settingKey.ToString()));
 }
示例#4
0
 public static void SaveSetting(Saving.SettingKey settingKey, bool value)
 {
     PlayerPrefs.SetInt(settingKey.ToString(), (!value) ? 0 : 1);
     PlayerPrefs.Save();
 }