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