public void AddPersistentListener(TestityAction call, TestityEventCallState callState)
		{
			int persistentEventCount = base.GetPersistentEventCount();
			base.AddPersistentListener();
			this.RegisterPersistentListener(persistentEventCount, call);
			base.SetPersistentListenerState(persistentEventCount, callState);
		}
Example #2
0
        public void AddVoidPersistentListener(TestityAction call)
        {
            int persistentEventCount = this.GetPersistentEventCount();

            this.AddPersistentListener();
            this.RegisterVoidPersistentListener(persistentEventCount, call);
        }
Example #3
0
        public void AddBoolPersistentListener(TestityAction <bool> call, bool argument)
        {
            int persistentEventCount = this.GetPersistentEventCount();

            this.AddPersistentListener();
            this.RegisterBoolPersistentListener(persistentEventCount, call, argument);
        }
Example #4
0
        public void AddFloatPersistentListener(TestityAction <float> call, float argument)
        {
            int persistentEventCount = this.GetPersistentEventCount();

            this.AddPersistentListener();
            this.RegisterFloatPersistentListener(persistentEventCount, call, argument);
        }
Example #5
0
        public void AddStringPersistentListener(TestityAction <string> call, string argument)
        {
            int persistentEventCount = this.GetPersistentEventCount();

            this.AddPersistentListener();
            this.RegisterStringPersistentListener(persistentEventCount, call, argument);
        }
Example #6
0
        public void AddIntPersistentListener(TestityAction <int> call, int argument)
        {
            int persistentEventCount = this.GetPersistentEventCount();

            this.AddPersistentListener();
            this.RegisterIntPersistentListener(persistentEventCount, call, argument);
        }
Example #7
0
        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 AddPersistentListener(TestityAction call, TestityEventCallState callState)
        {
            int persistentEventCount = base.GetPersistentEventCount();

            base.AddPersistentListener();
            this.RegisterPersistentListener(persistentEventCount, call);
            base.SetPersistentListenerState(persistentEventCount, callState);
        }
		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 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);
 }
Example #11
0
 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();
 }
Example #12
0
 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;
 }
		/// <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());
		}
 private static TestityBaseInvokableCall GetDelegate(TestityAction action)
 {
     return(new TestityInvokableCall(action));
 }
 public InvokableCall(TestityAction <T1> action)
 {
     this.Delegate += action;
 }
		public void AddPersistentListener(TestityAction call)
		{
			this.AddPersistentListener(call, TestityEventCallState.RuntimeOnly);
		}
		/// <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);
		}
 /// <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));
 }