27 lines
1.0 KiB
C#
27 lines
1.0 KiB
C#
namespace AibisDream.SaveSystem
|
|
{
|
|
/// <summary>
|
|
/// 一次性注册 P1 所需的全部 <see cref="ISnapshotProvider"/>。
|
|
/// 由 <see cref="YarnVariableStorage"/> 与 <see cref="SnapshotService"/> 在首次使用时调用。
|
|
/// </summary>
|
|
public static class SnapshotBootstrap
|
|
{
|
|
private static bool _initialized;
|
|
|
|
/// <summary>幂等;重复调用无副作用。</summary>
|
|
public static void EnsureInitialized()
|
|
{
|
|
if (_initialized) return;
|
|
_initialized = true;
|
|
|
|
SnapshotRegistry.Register(new SceneSnapshotProvider());
|
|
SnapshotRegistry.Register(new MacroSnapshotProvider());
|
|
SnapshotRegistry.Register(new EnvironmentSnapshotProvider());
|
|
SnapshotRegistry.Register(new ActorSnapshotProvider());
|
|
SnapshotRegistry.Register(new AudioSnapshotProvider());
|
|
SnapshotRegistry.Register(new TimelineSnapshotProvider());
|
|
SnapshotRegistry.Register(new ScreenSnapshotProvider());
|
|
}
|
|
}
|
|
}
|