chore: initial commit
This commit is contained in:
19
Assets/Scripts/Core/Events/IEventChannelRegistry.cs
Normal file
19
Assets/Scripts/Core/Events/IEventChannelRegistry.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user