Files
zeling_v2/Assets/Scripts/Core/ISaveService.cs
2026-05-08 11:04:00 +08:00

30 lines
1.0 KiB
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.Threading.Tasks;
namespace BaseGames.Core
{
/// <summary>
/// 存档服务接口。对外暴露存档系统的高层操作,供其他模块通过 ServiceLocator 访问。
/// 实现由 BaseGames.Core.Save 程序集的 SaveManager 提供。
/// </summary>
public interface ISaveService
{
/// <summary>将当前游戏状态写入指定存档槽。</summary>
Task SaveAsync(int slot);
/// <summary>从指定存档槽加载游戏状态。成功返回 true存档损坏/不存在返回 false。</summary>
Task<bool> LoadAsync(int slot);
/// <summary>快速存档(覆盖当前活跃槽)。</summary>
void QuickSave();
/// <summary>快速读档(从当前活跃槽加载)。</summary>
Task QuickLoadAsync();
/// <summary>指定槽是否存在有效存档。</summary>
bool HasSave(int slot);
/// <summary>当前活跃存档槽02。</summary>
int ActiveSlot { get; }
}
}