public static void InvokeAnySelectedFinger(LeanSelectByFinger select, LeanSelectableByFinger selectable, LeanFinger finger) { if (OnAnySelectedFinger != null) { OnAnySelectedFinger.Invoke(select, selectable, finger); } }
/// <summary>This method allows you to manually select an object with the specified finger using this component's selection settings.</summary> public void Select(LeanSelectable selectable, LeanFinger finger) { if (TrySelect(selectable) == true) { var selectableByFinger = selectable as LeanSelectableByFinger; if (selectableByFinger != null) { if (selectableByFinger.SelectingFingers.Contains(finger) == false) { selectableByFinger.SelectingFingers.Add(finger); } selectableByFinger.OnSelectedFinger.Invoke(finger); LeanSelectableByFinger.InvokeAnySelectedFinger(this, selectableByFinger, finger); if (finger.Up == true) { selectableByFinger.OnSelectedFingerUp.Invoke(finger); selectableByFinger.SelectingFingers.Remove(finger); } } if (onSelectedFinger != null) { onSelectedFinger.Invoke(selectable, finger); } if (OnAnySelectedFinger != null) { OnAnySelectedFinger.Invoke(this, selectable, finger); } } else { if (finger.Up == false) { var selectableByFinger = selectable as LeanSelectableByFinger; if (selectableByFinger != null) { if (selectableByFinger.SelectingFingers.Contains(finger) == false) { selectableByFinger.SelectingFingers.Add(finger); } } } } }