public GamePersistance(BaseGame game) { Game = game; if (AsyncIO.DoesFileExistAsync(ApplicationData.Current.RoamingFolder, "Data")) { _result = Load <T>(ApplicationData.Current.RoamingFolder, "Data"); } else { _data = new T(); Save(); } }
public GameSettings(Arkanoid arkanoidGame) { ArkanoidGame = arkanoidGame; if (AsyncIO.DoesFileExistAsync(ApplicationData.Current.RoamingFolder, "Unlocks")) { _result = Load <Dictionary <string, WadScore> >(ApplicationData.Current.RoamingFolder, "Unlocks"); } else { _unlocks = new Dictionary <string, WadScore>(); Save(); } }