//Loads the settings. Creates a new file if none exists private void LoadSettings() { Settings = ClassToXmlFileIO.Load <Settings>("Project_SOUL", "Settings"); if (Settings == null) { Settings = new Settings(); ClassToXmlFileIO.Save("Project_SOUL", "Settings", Settings); } }
//Loads the game progress. Creates a new save if it can't find an existing one private void LoadData() { Save = ClassToXmlFileIO.Load <SaveFile>("Project_SOUL", "Save"); if (Save == null) { Save = new SaveFile(); ClassToXmlFileIO.Save("Project_SOUL", "Save", Save); } }
//Loads the keybinds. Creates a new file if none exists private void LoadKeys() { Keys = ClassToXmlFileIO.Load <Keys>("Project_SOUL", "Keybindings"); if (Keys == null) { Keys = new Keys(); ClassToXmlFileIO.Save("Project_SOUL", "Keybindings", Keys); } }