public static void Main(string[] args) { liveViewerTools = new LiveViewerTools(); return; string path = new StackFrame(true).GetFileName(); DirectoryInfo dir = new FileInfo(path).Directory.Parent; FileInfo fileInfo; fileInfo = new FileInfo(dir.FullName + "\\" + file); PrefData prefData = liveViewerTools.ReadPlayerPrefData(fileInfo.FullName); Console.WriteLine(prefData.userPoint); prefData.userPoint = int.MaxValue - 1; liveViewerTools.SavePlayerPrefData(prefData, fileInfo.FullName); fileInfo = new FileInfo(dir.FullName + "\\" + "save/model/0aebec1a5c751a10396c4790bedbb49e"); string data = liveViewerTools.ReadDatString(fileInfo.FullName); ModelData.CharState state = liveViewerTools.LoadCaraState(data); state.intimacy = 100; Console.WriteLine(new DateTime(state.lastTicks)); state.lastTicks = new DateTime(2019, 2, 16).Ticks;// DateTime.Now.Ticks; state.maxIntimacy = 1; //liveViewerTools.SaveDat(state, fileInfo.FullName); fileInfo = new FileInfo(dir.FullName + "\\" + "save/save.dat"); data = liveViewerTools.ReadDatString(fileInfo.FullName); SaveData save = liveViewerTools.LoadSave(data); //liveViewerTools.SaveDat(save, fileInfo.FullName); fileInfo = new FileInfo(dir.FullName + "\\" + "save/autosave.dat"); data = liveViewerTools.ReadDatString(fileInfo.FullName); PresetData autosave = liveViewerTools.LoadAutoSave(data); //liveViewerTools.SaveDat(autosave, fileInfo.FullName); Console.ReadKey(); }
public static bool UserSave(PrefData prefData, string path = LiveViewerTools.PLAYERPREFS_PATH) { return(liveViewerTools.SavePlayerPrefData(prefData, path)); }