Example #1
0
        public override void LoadFromDict(string dataKey, Dictionary<string, object> dict)
        {
            _key = dataKey;

            if (dict == null)
                LoadFromSavedData(dataKey);
            else
            {
                dict.TryGetBoolTwoDList(bKey, out b);
                dict.TryGetIntTwoDList(iKey, out i);
                dict.TryGetFloatTwoDList(fKey, out f);
                dict.TryGetStringTwoDList(sKey, out s);
                dict.TryGetVector2TwoDList(v2Key, out v2);
                dict.TryGetVector3TwoDList(v3Key, out v3);
                dict.TryGetVector4TwoDList(v4Key, out v4);
                dict.TryGetColorTwoDList(cKey, out c);
                dict.TryGetGameObjectTwoDList(goKey, out go);
                dict.TryGetTexture2DTwoDList(texKey, out tex);
                dict.TryGetMaterialTwoDList(matKey, out mat);
                dict.TryGetAudioClipTwoDList(audKey, out aud);

                dict.TryGetCustomTwoDList(cusKey, out cus);
                LoadFromSavedData(dataKey);
            }
        }
        public override void LoadFromDict(string dataKey, Dictionary<string, object> dict)
        {
            _key = dataKey;

            if (dict == null)
                LoadFromSavedData(dataKey);
            else
            {
                dict.TryGetBoolTwoDList(bool_2dlistKey, out bool_2dlist);
                dict.TryGetIntTwoDList(int_2dlistKey, out int_2dlist);
                dict.TryGetFloatTwoDList(float_2dlistKey, out float_2dlist);
                dict.TryGetStringTwoDList(string_2dlistKey, out string_2dlist);
                dict.TryGetVector2TwoDList(vector2_2dlistKey, out vector2_2dlist);
                dict.TryGetVector3TwoDList(vector3_2dlistKey, out vector3_2dlist);
                dict.TryGetVector4TwoDList(vector4_2dlistKey, out vector4_2dlist);
                dict.TryGetColorTwoDList(color_2dlistKey, out color_2dlist);

                dict.TryGetCustomTwoDList(custom_2dlistKey, out custom_2dlist);
                LoadFromSavedData(dataKey);
            }
        }