mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[Fix] GameEvent
[Fix] GameEvent
This commit is contained in:
@@ -13,6 +13,7 @@ namespace TEngine
|
|||||||
private static readonly EventMgr EventMgr = new EventMgr();
|
private static readonly EventMgr EventMgr = new EventMgr();
|
||||||
|
|
||||||
#region 细分的注册接口
|
#region 细分的注册接口
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 增加事件监听。
|
/// 增加事件监听。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -149,6 +150,7 @@ namespace TEngine
|
|||||||
{
|
{
|
||||||
EventMgr.Dispatcher.RemoveEventListener(StringId.StringToHash(eventType), handler);
|
EventMgr.Dispatcher.RemoveEventListener(StringId.StringToHash(eventType), handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 分发消息接口
|
#region 分发消息接口
|
||||||
@@ -180,7 +182,7 @@ namespace TEngine
|
|||||||
|
|
||||||
public static void Send<TArg1, TArg2, TArg3, TArg4>(int eventType, TArg1 arg1, TArg2 arg2, TArg3 arg3, TArg4 arg4)
|
public static void Send<TArg1, TArg2, TArg3, TArg4>(int eventType, TArg1 arg1, TArg2 arg2, TArg3 arg3, TArg4 arg4)
|
||||||
{
|
{
|
||||||
EventMgr.Dispatcher.Send(eventType, arg1, arg2, arg3);
|
EventMgr.Dispatcher.Send(eventType, arg1, arg2, arg3, arg4);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Send<TArg1, TArg2, TArg3, TArg4, TArg5>(int eventType, TArg1 arg1, TArg2 arg2, TArg3 arg3, TArg4 arg4, TArg5 arg5)
|
public static void Send<TArg1, TArg2, TArg3, TArg4, TArg5>(int eventType, TArg1 arg1, TArg2 arg2, TArg3 arg3, TArg4 arg4, TArg5 arg5)
|
||||||
@@ -228,6 +230,7 @@ namespace TEngine
|
|||||||
{
|
{
|
||||||
EventMgr.Dispatcher.Send(StringId.StringToHash(eventType), handler);
|
EventMgr.Dispatcher.Send(StringId.StringToHash(eventType), handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user