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

23 lines
956 B
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.
namespace BaseGames.Equipment
{
/// <summary>
/// 工具槽查询接口(架构 09_ProgressionModule §7.5)。
/// UI 层通过 ServiceLocator.GetOrDefault&lt;IToolSlotService&gt;() 消费此接口,
/// 避免直接引用 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);
}
}