/// <summary> /// 保存本地存储数据 /// </summary> public static void SaveLocalSaveData() { string path = UniversalTool.GetSaveFilePath("LocalSaveData.json"); string jsonStr = JsonMapper.ToJson(StaticData.playerInfoData.CurLocalSaveData); UniversalTool.SaveJson(path, jsonStr); }
/// <summary> /// 保存地鼠信息到json /// </summary> public void SaveMouseInfo() { if (isUser) { mouseGenerateInfo.IsActiveMouse = isActive; } string path = UniversalTool.GetSaveFilePath("MonarMouse.json"); string jsonStr = JsonMapper.ToJson(mouseGenerateInfo); UniversalTool.SaveJson(path, jsonStr); }
/// <summary> /// 私聊信息存储 /// </summary> /// <param name="fileName"></param> public static void PrivateChatSaveFile() { //需要保存的文件名称 string path = UniversalTool.GetSaveFilePath("PrivateChatMessages.json"); string jisonSre = JsonMapper.ToJson(_privateChannelMessages); UniversalTool.SaveJson(path, jisonSre); Debug.Log("接收消息就存储 存储地址:" + path); }