Ejemplo n.º 1
0
    /// <summary>
    /// 加载本地存储数据
    /// </summary>
    public static void LoadLocalSaveData()
    {
        string path = UniversalTool.GetSaveFilePath("LocalSaveData.json");
        string json = UniversalTool.LoadJson(path);

        if (!string.IsNullOrEmpty(json))
        {
            StaticData.playerInfoData.CurLocalSaveData = JsonMapper.ToObject <LocalSaveData>(json);
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 加载私聊文件
    /// </summary>
    public static void LoadPrivateChatFile()
    {
        string path = UniversalTool.GetSaveFilePath("PrivateChatMessages.json", false);

        if (String.IsNullOrEmpty(path))
        {
            return;
        }

        string json = UniversalTool.LoadJson(path);

        if (!String.IsNullOrEmpty(json))
        {
            _privateChannelMessages = null;
            _privateChannelMessages = JsonMapper.ToObject <List <PrivateChatSaveInfo> >(json);
        }
    }
Ejemplo n.º 3
0
 /// <summary>
 /// 加载地鼠存储的信息
 /// </summary>
 public void LoadMouseInfo()
 {
     if (mouseGenerateInfo == null)
     {
         string path = UniversalTool.GetSaveFilePath("MonarMouse.json");
         string json = UniversalTool.LoadJson(path);
         StaticData.DebugGreen(path);
         if (!String.IsNullOrEmpty(json))
         {
             mouseGenerateInfo = JsonMapper.ToObject <MouseGenerateInfo>(json);
         }
         else
         {
             mouseGenerateInfo = new MouseGenerateInfo();
         }
         if (isUser)
         {
             isActive = mouseGenerateInfo.IsActiveMouse;
         }
     }
 }