示例#1
0
    private static void load()
    {
        //load quests states from PlayerPrefs
        string json = SecurePlayerPrefs.GetString(jsonKey);

        if (!string.IsNullOrEmpty(json))
        {
            C_KeyValueArray kva = new C_KeyValueArray();
            JsonUtility.FromJsonOverwrite(json, kva);

            dictionaryWrapper = new C_DictWrapper(kva.ToDictionary());
            //Debug.Log("load kva: " + kva.ToString());
            // Debug.Log("load kvp: " + dictionaryWrapper.ToString());
        }
        else
        {
            dictionaryWrapper = new C_DictWrapper();
        }


        isLoaded = true;
    }
示例#2
0
 //clone method to allow casting from static to non static and vice versa
 public C_DictWrapper(C_DictWrapper dictionaryWrapper)
 {
     dictionary = new Dictionary <string, string>(dictionaryWrapper.dictionary);
 }