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; }
public void LoadGame(int saveSlot) { FileLoader loader = new FileLoader("save"); game.LoadGame(saveSlot, loader); }