예제 #1
0
 protected void RemoveHandlers()
 {
     if (onSwipe != null)
     {
         foreach (OnSwipeDlg d in onSwipe.GetInvocationList())
         {
             onSwipe -= d;
             print("unsubscribed");
         }
     }
 }
예제 #2
0
 /// <summary>
 /// Suscribes food functions to events
 /// </summary>
 /// <param name="target"></param>
 public void Suscribe(Food target)
 {
     onSwipe += target.Throw;
     print(onSwipe.GetInvocationList().Length);
 }