Exemple #1
0
        public virtual void Unhover(HandVR handVR, bool affectChildren = true)
        {
            hoverHands.Remove(handVR);

            if (hoverHands.Count == 0)
            {
                Hovered = false;
                OnUnhovered?.Invoke(handVR);
            }
        }
Exemple #2
0
        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;
                }
            }
        }
Exemple #3
0
 public virtual void FireOnUnhovered()
 {
     OnUnhovered?.Invoke();
     NotifyChanged();
 }