应恢弘之约,写了一个对其发布的匿名函数动态绑定到事件的封装,代码如下: type TAnonEvent=class public class function Wrap<T1,T2>(OnEvent:T1):T2; end; { TAnonEvent } class function TAnonEvent.Wrap<T1,T2>(OnEvent: T1):T2; var Addr:Pointer; AMethod:PMethod; begin Addr:=PPointer(@OnE
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Reflection; using System.Diagnostics; namespace WebApplication5 { public partial class _Default :
using System.Collections.Generic;using UnityEngine;using UnityEngine.EventSystems;using UnityEngine.Events; public class EventManager { public static void addEventListener(GameObject go,EventTriggerType type,UnityAction<BaseEventData>callback) { Eve