Exemplo n.º 1
0
    public static string GetString(string key, string defaultValue = "")
    {
        string text    = defaultValue;
        string @string = PlayerPrefs.GetString(CryptoPrefs.GetHash(key), defaultValue.ToString());

        if (!text.Equals(@string))
        {
            text = CryptoPrefs.Decrypt(@string);
        }
        return(text);
    }
Exemplo n.º 2
0
 public static void SetInt(string key, int val)
 {
     PlayerPrefs.SetString(CryptoPrefs.GetHash(key), CryptoPrefs.Encrypt(val.ToString()));
 }
Exemplo n.º 3
0
    public static void DeleteKey(string key)
    {
        string hash = CryptoPrefs.GetHash(key);

        PlayerPrefs.DeleteKey(hash);
    }
Exemplo n.º 4
0
    public static bool HasKey(string key)
    {
        string hash = CryptoPrefs.GetHash(key);

        return(PlayerPrefs.HasKey(hash));
    }
Exemplo n.º 5
0
 public static void SetString(string key, string val)
 {
     PlayerPrefs.SetString(CryptoPrefs.GetHash(key), CryptoPrefs.Encrypt(val));
 }