Files
zeling_v2/Assets/_Game/Scripts/Equipment/IEquipmentService.cs
2026-05-25 11:54:37 +08:00

32 lines
1.1 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.Collections.Generic;
namespace BaseGames.Equipment
{
/// <summary>
/// 装备管理服务接口。UI 层通过此接口读取护符状态并驱动装备操作,
/// 与 EquipmentManager 具体实现解耦,便于独立测试和跨场景复用。
/// </summary>
public interface IEquipmentService
{
/// <summary>已使用的 Notch 数量(缓存值,避免每帧 LINQ Sum。</summary>
int UsedNotches { get; }
/// <summary>Notch 总容量。</summary>
int TotalNotches { get; }
/// <summary>当前已装备护符列表(只读视图)。</summary>
IReadOnlyList<CharmSO> Equipped { get; }
/// <summary>已收集护符列表(只读视图)。</summary>
IReadOnlyList<CharmSO> Collected { get; }
/// <summary>
/// 装备护符。返回 null 表示成功;返回错误描述字符串表示失败原因。
/// </summary>
string TryEquipCharm(CharmSO charm);
/// <summary>卸下指定护符。</summary>
void UnequipCharm(CharmSO charm);
}
}