public Settings_save(Settings_save settings, float newWPM, bool newAutoMode, bool newWordCount) { scene = settings.scene; WPM = newWPM; autoMode = newAutoMode; doubleWords = newWordCount; }
public SaveFile(Position_Save positions, Player_save player, Backpack_Save backpack, Settings_save settings) { this.positions = positions; this.player = player; this.backpack = backpack; this.settings = settings; }
public void ReturnSelectOptions() { SaveSystem.OverrideSettings(currentSaveSettings, "/checkpoint_SettingsSave.test" + saveFileInt.ToString(), WPM, automode, doubleWords); canPushButtons = false; currentSaveSettings = SaveSystem.LordSettings("/checkpoint_SettingsSave.test" + saveFileInt); a.CloseOptiones(); }
public static SaveFile GetSaveFile(int SaveFile) { Position_Save positons = loadPostion("/checkpoint_SavePosition.test" + SaveFile.ToString()); Player_save player = loadPlayerFile("/checkpoint_SavePlayer.test" + SaveFile.ToString()); Backpack_Save backpack = loadBackpackFile("/checkpoint_BackpackSave.test" + SaveFile.ToString()); Settings_save settings = LordSettings("/checkpoint_SettingsSave.test" + SaveFile.ToString()); SaveFile file = new SaveFile(positons, player, backpack, settings); return(file); }
public static void OverrideSettings(string newString, string savePostion, float WPM, bool autoMode, bool doubleWords) { BinaryFormatter formatter = new BinaryFormatter(); string path = Application.persistentDataPath + savePostion; FileStream stream = new FileStream(path, FileMode.Create); Settings_save data = new Settings_save(newString, WPM, autoMode, doubleWords); formatter.Serialize(stream, data); stream.Close(); }
public static void SaveSettings(Settings settings, string savePostion) { BinaryFormatter formatter = new BinaryFormatter(); string path = Application.persistentDataPath + savePostion; FileStream stream = new FileStream(path, FileMode.Create); Settings_save data = new Settings_save(settings); formatter.Serialize(stream, data); stream.Close(); }
public void OverRideSetting(string _saveString) { Settings_save _save = SaveSystem.LordSettings(_saveString); if (_save == null) { return; } _scene = _save.scene; WPM = _save.WPM; autoMode = _save.autoMode; doublWordCount = _save.doubleWords; }
public void GetSelectFileAction() { MTE.SetFileName("Savefile " + (saveFileInt + 1).ToString()); canPushButtons = false; a.OpenFile(saveFileInt); currentSaveSettings = SaveSystem.LordSettings("/checkpoint_SettingsSave.test" + saveFileInt); if (currentSaveSettings == null) { noSafe = true; MTE.SetActionUI(false); } else { noSafe = false; MTE.SetActionUI(true); } }
public static Settings_save LordSettings(string savePostion) { string path = Application.persistentDataPath + savePostion; if (File.Exists(path)) { BinaryFormatter formatter = new BinaryFormatter(); FileStream stream = new FileStream(path, FileMode.Open); Settings_save data = formatter.Deserialize(stream) as Settings_save; stream.Close(); return(data); } else { Debug.Log("what?"); return(null); } }