59 lines
1.7 KiB
C#
59 lines
1.7 KiB
C#
using System;
|
|
using System.Reflection;
|
|
using UnityEngine.Scripting;
|
|
using UnityEngineInternal;
|
|
|
|
namespace UnityEngine.Events
|
|
{
|
|
// Token: 0x02000484 RID: 1156
|
|
[Serializable]
|
|
public abstract class UnityEvent<T0> : UnityEventBase
|
|
{
|
|
// Token: 0x060039EC RID: 14828 RVA: 0x0006522C File Offset: 0x0006342C
|
|
[RequiredByNativeCode]
|
|
public UnityEvent()
|
|
{
|
|
}
|
|
|
|
// Token: 0x060039ED RID: 14829 RVA: 0x00065244 File Offset: 0x00063444
|
|
public void AddListener(UnityAction<T0> call)
|
|
{
|
|
base.AddCall(UnityEvent<T0>.GetDelegate(call));
|
|
}
|
|
|
|
// Token: 0x060039EE RID: 14830 RVA: 0x00065254 File Offset: 0x00063454
|
|
public void RemoveListener(UnityAction<T0> call)
|
|
{
|
|
base.RemoveListener(call.Target, call.GetMethodInfo());
|
|
}
|
|
|
|
// Token: 0x060039EF RID: 14831 RVA: 0x0006526C File Offset: 0x0006346C
|
|
protected override MethodInfo FindMethod_Impl(string name, object targetObj)
|
|
{
|
|
return UnityEventBase.GetValidMethodInfo(targetObj, name, new Type[] { typeof(T0) });
|
|
}
|
|
|
|
// Token: 0x060039F0 RID: 14832 RVA: 0x0006529C File Offset: 0x0006349C
|
|
internal override BaseInvokableCall GetDelegate(object target, MethodInfo theFunction)
|
|
{
|
|
return new InvokableCall<T0>(target, theFunction);
|
|
}
|
|
|
|
// Token: 0x060039F1 RID: 14833 RVA: 0x000652B8 File Offset: 0x000634B8
|
|
private static BaseInvokableCall GetDelegate(UnityAction<T0> action)
|
|
{
|
|
return new InvokableCall<T0>(action);
|
|
}
|
|
|
|
// Token: 0x060039F2 RID: 14834 RVA: 0x000652D4 File Offset: 0x000634D4
|
|
public void Invoke(T0 arg0)
|
|
{
|
|
this.m_InvokeArray[0] = arg0;
|
|
base.Invoke(this.m_InvokeArray);
|
|
}
|
|
|
|
// Token: 0x04001193 RID: 4499
|
|
private readonly object[] m_InvokeArray = new object[1];
|
|
}
|
|
}
|