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,26 @@
using System;
namespace BaseGames.Spells
{
/// <summary>
/// 法术管理服务接口。UI 层SpellSlotWidget通过此接口读取法术状态
/// 与 SpellManager 具体实现解耦,支持测试场景下的 Mock 替换。
/// </summary>
public interface ISpellService
{
/// <summary>当前装备的法术null 表示未装备。</summary>
SpellSO EquippedSpell { get; }
/// <summary>冷却进度0 = 就绪1 = 刚施放)。</summary>
float CooldownFraction { get; }
/// <summary>法术当前是否可施放(已装备且冷却完毕)。</summary>
bool IsReady { get; }
/// <summary>
/// 法术装备或卸下时触发。参数为新法术null 表示已卸下。
/// UI 订阅此事件可实现零延迟的图标刷新,无需轮询。
/// </summary>
event Action<SpellSO> OnSpellChanged;
}
}