23 lines
956 B
C#
23 lines
956 B
C#
namespace BaseGames.Equipment
|
||
{
|
||
/// <summary>
|
||
/// 工具槽查询接口(架构 09_ProgressionModule §7.5)。
|
||
/// UI 层通过 ServiceLocator.GetOrDefault<IToolSlotService>() 消费此接口,
|
||
/// 避免直接引用 ToolSlotManager 具体类型,保持 UI 与 Equipment 程序集的解耦。
|
||
/// </summary>
|
||
public interface IToolSlotService
|
||
{
|
||
/// <summary>返回指定槽位当前装备的 ToolSO;槽位为空时返回 null。</summary>
|
||
ToolSO GetTool(int slotIndex);
|
||
|
||
/// <summary>返回指定槽位剩余使用次数;-1 表示无限次;槽位为空时返回 0。</summary>
|
||
int GetRemainingUses(int slotIndex);
|
||
|
||
/// <summary>
|
||
/// 返回指定槽位的冷却进度比例,范围 [0, 1]。
|
||
/// 0 = 不在冷却中(可使用);1 = 刚刚使用,冷却刚开始。
|
||
/// </summary>
|
||
float GetCooldownRatio(int slotIndex);
|
||
}
|
||
}
|