Example #1
0
        public override void LoadFromSavedData(string dataKey)
        {
            _key = dataKey;

            _TestInt    = GDEDataManager.GetInt(_key, TestIntKey, _TestInt);
            _TestString = GDEDataManager.GetString(_key, TestStringKey, _TestString);

            _TestSchema = GDEDataManager.GetCustom(_key, TestSchemaKey, _TestSchema);

            TestList = GDEDataManager.GetStringList(_key, TestListKey, TestList);
        }
Example #2
0
        public GDETest2SchemaData ShallowClone()
        {
            string             newKey   = Guid.NewGuid().ToString();
            GDETest2SchemaData newClone = new GDETest2SchemaData(newKey);

            newClone.TestBool = TestBool;

            newClone.TestIntList = new List <int>(TestIntList);
            newClone.Set_TestIntList();

            return(newClone);
        }
Example #3
0
        public void Reset_TestSchema()
        {
            GDEDataManager.ResetToDefault(_key, TestSchemaKey);

            Dictionary <string, object> dict;

            GDEDataManager.Get(_key, out dict);

            string customDataKey;

            dict.TryGetString(TestSchemaKey, out customDataKey);
            _TestSchema = new GDETest2SchemaData(customDataKey);

            TestSchema.ResetAll();
        }
Example #4
0
        public override void LoadFromDict(string dataKey, Dictionary <string, object> dict)
        {
            _key = dataKey;

            if (dict == null)
            {
                LoadFromSavedData(dataKey);
            }
            else
            {
                dict.TryGetInt(TestIntKey, out _TestInt);
                dict.TryGetString(TestStringKey, out _TestString);

                string customDataKey;
                dict.TryGetString(TestSchemaKey, out customDataKey);
                _TestSchema = new GDETest2SchemaData(customDataKey);

                dict.TryGetStringList(TestListKey, out TestList);
                LoadFromSavedData(dataKey);
            }
        }
Example #5
0
        public GDETest2SchemaData DeepClone()
        {
            GDETest2SchemaData newClone = ShallowClone();

            return(newClone);
        }