Exemple #1
0
 public string[] GetSaveSlots()
 {
     FileLoader loader = new FileLoader("save");
     string[] s = new string[20];
     for (int i = 1; i < 20; ++i) {
         string fileName = string.Format("savemap{0}.xml", i);
         if (!loader.Exists(fileName)) {
             s[i - 1] = "";
         }
         else {
             PropertyReader r = loader.GetPropertyReader().Select(fileName);
             s[i - 1] = r.GetString("mapname");
         }
     }
     return s;
 }
Exemple #2
0
        public void LoadGame(int saveSlot)
        {
            FileLoader loader = new FileLoader("save");

            game.LoadGame(saveSlot, loader);
        }