コード例 #1
0
 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();
     }
 }
コード例 #2
0
 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();
     }
 }