/// <summary> /// 移除事件响应处理 /// </summary> /// <param name="id">消息名</param> /// <param name="de">响应函数</param> static public void RemoveEvent(uint id, DelegateType.EventCallback de) { if (idEventCallback.ContainsKey(id)) { idEventCallback[id] -= de; } }
/// <summary> /// 添加事件响应处理 /// </summary> /// <param name="id">消息名</param> /// <param name="de">响应函数</param> static public void RegisterEvent(uint id, DelegateType.EventCallback de) { if (idEventCallback.ContainsKey(id)) { idEventCallback[id] += de; } else { idEventCallback[id] = de; } }