Files
Dec2017-Script-Dump/UnityEngine/Events/UnityEvent.3.cs
T
2026-06-04 11:42:34 +02:00

64 lines
1.7 KiB
C#

using System;
using System.Reflection;
using UnityEngine.Scripting;
using UnityEngineInternal;
namespace UnityEngine.Events
{
// Token: 0x02000486 RID: 1158
[Serializable]
public abstract class UnityEvent<T0, T1> : UnityEventBase
{
// Token: 0x060039F7 RID: 14839 RVA: 0x000652F4 File Offset: 0x000634F4
[RequiredByNativeCode]
public UnityEvent()
{
}
// Token: 0x060039F8 RID: 14840 RVA: 0x0006530C File Offset: 0x0006350C
public void AddListener(UnityAction<T0, T1> call)
{
base.AddCall(UnityEvent<T0, T1>.GetDelegate(call));
}
// Token: 0x060039F9 RID: 14841 RVA: 0x0006531C File Offset: 0x0006351C
public void RemoveListener(UnityAction<T0, T1> call)
{
base.RemoveListener(call.Target, call.GetMethodInfo());
}
// Token: 0x060039FA RID: 14842 RVA: 0x00065334 File Offset: 0x00063534
protected override MethodInfo FindMethod_Impl(string name, object targetObj)
{
return UnityEventBase.GetValidMethodInfo(targetObj, name, new Type[]
{
typeof(T0),
typeof(T1)
});
}
// Token: 0x060039FB RID: 14843 RVA: 0x00065370 File Offset: 0x00063570
internal override BaseInvokableCall GetDelegate(object target, MethodInfo theFunction)
{
return new InvokableCall<T0, T1>(target, theFunction);
}
// Token: 0x060039FC RID: 14844 RVA: 0x0006538C File Offset: 0x0006358C
private static BaseInvokableCall GetDelegate(UnityAction<T0, T1> action)
{
return new InvokableCall<T0, T1>(action);
}
// Token: 0x060039FD RID: 14845 RVA: 0x000653A8 File Offset: 0x000635A8
public void Invoke(T0 arg0, T1 arg1)
{
this.m_InvokeArray[0] = arg0;
this.m_InvokeArray[1] = arg1;
base.Invoke(this.m_InvokeArray);
}
// Token: 0x04001194 RID: 4500
private readonly object[] m_InvokeArray = new object[2];
}
}