UI系统优化

This commit is contained in:
2026-05-25 11:54:37 +08:00
parent c7057db27d
commit 3c812cfb41
130 changed files with 4738 additions and 477 deletions

View File

@@ -0,0 +1,22 @@
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);
}
}