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); }
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); }
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(); }
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); } }
public GDETest2SchemaData DeepClone() { GDETest2SchemaData newClone = ShallowClone(); return(newClone); }