public virtual void Unhover(HandVR handVR, bool affectChildren = true) { hoverHands.Remove(handVR); if (hoverHands.Count == 0) { Hovered = false; OnUnhovered?.Invoke(handVR); } }
public void KillAllSubscribers() { if (OnClicked != null) { foreach (var del in OnClicked?.GetInvocationList()) { OnClicked -= (Action)del; } } if (OnHovered != null) { foreach (var del in OnHovered?.GetInvocationList()) { OnHovered -= (Action)del; } } if (OnUnhovered != null) { foreach (var del in OnUnhovered?.GetInvocationList()) { OnUnhovered -= (Action)del; } } if (OnPressed != null) { foreach (var del in OnPressed?.GetInvocationList()) { OnPressed -= (Action)del; } } if (OnReleased != null) { foreach (var del in OnReleased?.GetInvocationList()) { OnReleased -= (Action)del; } } if (OnHold != null) { foreach (var del in OnHold?.GetInvocationList()) { OnHold -= (Action)del; } } }
public virtual void FireOnUnhovered() { OnUnhovered?.Invoke(); NotifyChanged(); }