20 lines
827 B
C#
20 lines
827 B
C#
namespace AibisDream.SaveSystem
|
|
{
|
|
/// <summary>
|
|
/// 快照层捕获 API。恢复必须通过 GameManager 会话命令进入。
|
|
/// 游戏逻辑应优先使用 <see cref="SaveRestoreOrchestrator"/> 完成存读档流程。
|
|
/// </summary>
|
|
public static class SnapshotService
|
|
{
|
|
/// <summary>捕获当前运行时快照。</summary>
|
|
/// <param name="triggerNodeName">见 <see cref="SnapshotCapture.Capture"/>。</param>
|
|
/// <param name="omitAnchor">见 <see cref="SnapshotCapture.Capture"/>。</param>
|
|
public static SaveSnapshot Capture(string triggerNodeName = null, bool omitAnchor = false)
|
|
{
|
|
SnapshotRegistry.EnsureInitialized();
|
|
return SnapshotCapture.Capture(YarnVariableStorage.Instance, triggerNodeName, omitAnchor);
|
|
}
|
|
|
|
}
|
|
}
|