Files
SoulliesOfficial c3b1561375 更新
2026-04-01 12:23:27 -04:00

40 lines
1.3 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
namespace Continentis.MainGame.Saving
{
/// <summary>
/// 游戏存档的根节点,作为单一顶层对象写入 ES3 文件。
/// ES3 用法ES3.Save("GameSave", gameSave, "save.es3")
/// ES3.Load&lt;GameSave&gt;("GameSave", "save.es3")
/// </summary>
public class GameSave
{
/// <summary>
/// 存档格式版本号。当数据结构发生破坏性变更时递增,
/// SaveManager 读取时据此执行迁移逻辑。
/// </summary>
public int saveVersion = 1;
/// <summary>最后一次保存的时间戳UTC。</summary>
public DateTime saveTime;
/// <summary>
/// 玩家账号级别数据(解锁内容、统计数据),跨跑局持久。
/// </summary>
public PlayerSave playerData;
/// <summary>
/// 当前进行中的跑局快照。null 表示无进行中的跑局(主菜单状态)。
/// </summary>
public RunSave currentRun;
public GameSave()
{
playerData = new PlayerSave();
currentRun = null;
}
/// <summary>判断当前是否存在未完成的跑局。</summary>
public bool HasActiveRun => currentRun != null;
}
}