private void ReadGameCount() { string path = TASRecorder.GetInputPath("game_count.txt"); if (File.Exists(path)) { GameCount = int.Parse(File.ReadAllText(path)) + 1; } else { GameCount = 1; } DataWriter.WriteAllText(path, GameCount.ToString()); }
private void Initialize() { string path = TASRecorder.GetInputPath("game_count.txt"); if (File.Exists(path)) { GameCount = int.Parse(File.ReadAllText(path)) + 1; } else { GameCount = 1; } GameManager.Instance.DataWriter.WriteAllText(path, GameCount.ToString()); }
private void Awake() { if (enabled) { InputBuffer.Instance.Manual = true; if (autoReadInputsFromFile) { string path = TASRecorder.GetInputPath(targetGameCount); if (File.Exists(path)) { inputs = JsonConvert.DeserializeObject <TASMap>(File.ReadAllText(path)); } } } }