Files
aibis-dream/Assets/Scripts/SaveSystem/Providers/ScreenSnapshotProvider.cs
T

31 lines
811 B
C#
Raw 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.Collections;
namespace AibisDream.SaveSystem
{
/// <summary>
/// sections["screen"]:屏幕饱和度与演出淡入淡出遮罩。
/// 委托 <see cref="ScreenSnapshotHelper"/>RestoreOrder=70,通常在表现类最后还原。
/// </summary>
public class ScreenSnapshotProvider : ISnapshotProvider
{
public string SaveId => SnapshotProviderIds.Screen;
public int RestoreOrder => 70;
public object Capture()
{
return ScreenSnapshotHelper.Capture();
}
public IEnumerator Restore(object dto)
{
if (dto is not ScreenSnapshotDto screen)
{
yield break;
}
ScreenSnapshotHelper.Restore(screen);
yield break;
}
}
}