public UserSetData GetUserSetData() { if (UserSetDataExist()) { string value = RijndaelUtil.RijndaelDecrypt(key, FileUtil.GetAsset($"{PathUtil.GetPath(PathType.PersistentDataPath, "Res")}/UserSet.lcc")).GetString(); return(JsonUtil.ToObject <UserSetData>(value)); } return(new UserSetData(20, 100, CVType.Chinese, LccModel.LanguageType.Chinese, DisplayModeType.FullScreen, ResolutionType.Resolution1920x1080)); }
public UserData GetUserData(string name = "user") { if (UserDataExist(name)) { string value = RijndaelUtil.RijndaelDecrypt(key, FileUtil.GetAsset($"{PathUtil.GetPath(PathType.PersistentDataPath, "Res")}/{name}.lcc")).GetString(); return(JsonUtil.ToObject <UserData>(value)); } return(new UserData()); }
public void SaveUserSetData() { string value = RijndaelUtil.RijndaelEncrypt(key, JsonUtil.ToJson(userSetData)); FileUtil.SaveAsset($"{PathUtil.GetPath(PathType.PersistentDataPath, "Res")}/UserSet.lcc", value); }