using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerPrefManager { public const string INTERACT_CONFIG = "Interact_Config"; public static bool GetBool(string label, bool defaultValue) { int i = PlayerPrefs.GetInt(label, -1); if (i == -1) { return defaultValue; } if (i == 0) { return false; } else { return true; } } public static void SaveBool(string label, bool value) { if (value) { PlayerPrefs.SetInt(label, 1); } else { PlayerPrefs.SetInt(label, 0); } PlayerPrefs.Save(); } }