加入用户最近100场战绩记录并实现展示

This commit is contained in:
2026-03-16 23:18:58 +08:00
parent ec42f2e34b
commit f5c6f143c0
106 changed files with 12120 additions and 642 deletions
+9 -8
View File
@@ -263,20 +263,21 @@ public class UI_Panel_Mail : MonoBehaviour
isReceived = mail.isReceived
});
}
var json = JsonUtility.ToJson(data, true);
File.WriteAllText(GetSavePath(), json);
SecureSaveVault.SaveJson("mail_state", "runtime", data, GetLegacySavePath());
}
MailSaveData LoadMailState()
{
var path = GetSavePath();
if (!File.Exists(path)) return null;
var json = File.ReadAllText(path);
if (string.IsNullOrEmpty(json)) return null;
return JsonUtility.FromJson<MailSaveData>(json);
MailSaveData data;
if (!SecureSaveVault.TryLoadJson("mail_state", "runtime", out data, GetLegacySavePath()))
{
return null;
}
return data;
}
string GetSavePath()
string GetLegacySavePath()
{
return Path.Combine(Application.persistentDataPath, "mail_state.json");
}