public void AddPersistentListener(TestityAction call, TestityEventCallState callState) { int persistentEventCount = base.GetPersistentEventCount(); base.AddPersistentListener(); this.RegisterPersistentListener(persistentEventCount, call); base.SetPersistentListenerState(persistentEventCount, callState); }
public void AddVoidPersistentListener(TestityAction call) { int persistentEventCount = this.GetPersistentEventCount(); this.AddPersistentListener(); this.RegisterVoidPersistentListener(persistentEventCount, call); }
public void AddBoolPersistentListener(TestityAction <bool> call, bool argument) { int persistentEventCount = this.GetPersistentEventCount(); this.AddPersistentListener(); this.RegisterBoolPersistentListener(persistentEventCount, call, argument); }
public void AddFloatPersistentListener(TestityAction <float> call, float argument) { int persistentEventCount = this.GetPersistentEventCount(); this.AddPersistentListener(); this.RegisterFloatPersistentListener(persistentEventCount, call, argument); }
public void AddStringPersistentListener(TestityAction <string> call, string argument) { int persistentEventCount = this.GetPersistentEventCount(); this.AddPersistentListener(); this.RegisterStringPersistentListener(persistentEventCount, call, argument); }
public void AddIntPersistentListener(TestityAction <int> call, int argument) { int persistentEventCount = this.GetPersistentEventCount(); this.AddPersistentListener(); this.RegisterIntPersistentListener(persistentEventCount, call, argument); }
public void AddObjectPersistentListener <T>(TestityAction <T> call, T argument) where T : UnityEngine.Object { int persistentEventCount = this.GetPersistentEventCount(); this.AddPersistentListener(); this.RegisterObjectPersistentListener <T>(persistentEventCount, call, argument); }
public void RegisterPersistentListener(int index, TestityAction call) { if (call == null) { Debug.LogWarning("Registering a Listener requires an action"); return; } base.RegisterPersistentListener(index, call.Target as UnityEngine.Object, call.Method); }
public void RegisterVoidPersistentListener(int index, TestityAction call) { if (call == null) { Debug.LogWarning("Registering a Listener requires an action"); return; } if (!this.ValidateRegistration(call.Method, call.Target, TestityPersistentListenerMode.Void)) { return; } this.m_PersistentCalls.RegisterVoidPersistentListener(index, call.Target as UnityEngine.Object, call.Method.Name); this.DirtyPersistentCalls(); }
public void RegisterObjectPersistentListener <T>(int index, TestityAction <T> call, T argument) where T : UnityEngine.Object { if (call == null) { throw new ArgumentNullException("call", "Registering a Listener requires a non null call"); } if (!this.ValidateRegistration(call.Method, call.Target, TestityPersistentListenerMode.Object, (argument != null ? argument.GetType() : typeof(UnityEngine.Object)))) { return; } this.m_PersistentCalls.RegisterObjectPersistentListener(index, call.Target as UnityEngine.Object, argument, call.Method.Name); this.DirtyPersistentCalls(); }
public void AddPersistentListener(TestityAction call) { this.AddPersistentListener(call, TestityEventCallState.RuntimeOnly); }
/// <summary> /// <para>Remove a non persistent listener from the UnityEvent.</para> /// </summary> /// <param name="call">Callback function.</param> public void RemoveListener(TestityAction call) { base.RemoveListener(call.Target, call.GetMethodInfo()); }
public TestityInvokableCall(TestityAction action) { this.Delegate += action; }
private static TestityBaseInvokableCall GetDelegate(TestityAction action) { return(new TestityInvokableCall(action)); }
public InvokableCall(TestityAction <T1> action) { this.Delegate += action; }
/// <summary> /// <para>Add a non persistent listener to the UnityEvent.</para> /// </summary> /// <param name="call">Callback function.</param> public void AddListener(TestityAction call) { base.AddCall(TestityEvent.GetDelegate(call)); }
private static TestityBaseInvokableCall GetDelegate(TestityAction action) { return new TestityInvokableCall(action); }