public override void LoadDefaults() { GeneratorAchievments.Clear(); CompletedAchievments.Clear(); AchievmentPoints = 0; IsLoaded = true; }
public override void LoadSave(object obj) { AchievmentServiceSave save = obj as AchievmentServiceSave; if (save != null) { if (save.generatorAchievments != null) { GeneratorAchievments.Clear(); foreach (var kvp in save.generatorAchievments) { GeneratorAchievments.Add(kvp.Key, new GeneratorAchievmentCollection(kvp.Value)); } CompletedAchievments.Clear(); if (save.completedAchievments != null) { CompletedAchievments.AddRange(save.completedAchievments); } //Badges.Clear(); //if(save.badges != null ) { // Badges.AddRange(save.badges); //} this.AchievmentPoints = save.achievmentPoints; IsLoaded = true; } else { LoadDefaults(); } } else { LoadDefaults(); } }