using System.Collections; namespace AibisDream.SaveSystem { /// /// sections["timeline"]:各 PlayableDirector 的终/初态(TimelineCenter)。 /// 按 D1.1 只存 AtStart/AtEnd/Stopped,不存时间轴中间帧。 /// public class TimelineSnapshotProvider : ISnapshotProvider { public string SaveId => SnapshotProviderIds.Timeline; public int RestoreOrder => 60; public object Capture() { return TimelineCenter.Instance.CaptureSnapshot(); } public IEnumerator Restore(object dto) { if (dto is not TimelineSnapshotDto timeline) { yield break; } TimelineCenter.Instance.RestoreSnapshot(timeline); yield break; } } }