public void SetValue(bool value) { if (this.AppOnly) { SecurePlayerPrefs.SetString(this.Name, value.ToString(), Main.uniqueIdentifier); } else { CVarScripts.SetCVar(this.Name, (!value) ? "0" : "1", null); } }
public bool GetValue() { if (!this.AppOnly) { return(CVarScripts.GetCVar(this.Name) == "1"); } bool result = true; string @string = SecurePlayerPrefs.GetString(this.Name, Main.uniqueIdentifier); if (string.IsNullOrEmpty(@string)) { return(true); } bool.TryParse(@string, out result); return(result); }