Files
zeling_v2/Assets/Scripts/Core/Save/ISaveableRegistry.cs
2026-05-12 15:34:08 +08:00

17 lines
612 B
C#

namespace BaseGames.Core.Save
{
/// <summary>
/// ISaveable 注册表接口。
/// 将 ISaveable 对象的注册/注销责任与 SaveManager 的具体实现类解耦,
/// 使 SaveableMonoBehaviour 等组件无需直接依赖 <see cref="SaveManager"/>。
/// </summary>
public interface ISaveableRegistry
{
/// <summary>将 <paramref name="saveable"/> 加入存档系统管理。</summary>
void Register(ISaveable saveable);
/// <summary>将 <paramref name="saveable"/> 从存档系统移除。</summary>
void Unregister(ISaveable saveable);
}
}