20 lines
696 B
C#
20 lines
696 B
C#
using UnityEngine;
|
|
|
|
namespace BaseGames.Core.Events
|
|
{
|
|
/// <summary>
|
|
/// SO 事件频道注册表接口。
|
|
/// 允许 Core 层通过接口访问动态频道查找,而无需直接依赖 EventChannelRegistry 实现。
|
|
/// </summary>
|
|
public interface IEventChannelRegistry
|
|
{
|
|
/// <summary>注册一个事件频道 SO。key 通常为 SO 资产名(如 "EVT_HitConfirmed")。</summary>
|
|
void Register(string key, ScriptableObject channel);
|
|
|
|
/// <summary>
|
|
/// 按 key 查找事件频道。未找到或类型不匹配时返回 null 并输出错误日志。
|
|
/// </summary>
|
|
T Get<T>(string key) where T : ScriptableObject;
|
|
}
|
|
}
|