UI系统优化
This commit is contained in:
31
Assets/_Game/Scripts/Equipment/IEquipmentService.cs
Normal file
31
Assets/_Game/Scripts/Equipment/IEquipmentService.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user