Esempio n. 1
0
 public void UnregisterReceiver(UITooltipReceiver obj)
 {
     obj.onEnter -= OnPointerEnter;
     obj.onExit  -= OnPointerExit;
     obj.onDown  -= OnPointerDown;
     obj.onUp    -= OnPointerUp;
 }
Esempio n. 2
0
 public void RegisterReceiver(UITooltipReceiver obj)
 {
     obj.onEnter += OnPointerEnter;
     obj.onExit  += OnPointerExit;
     obj.onDown  += OnPointerDown;
     obj.onUp    += OnPointerUp;
 }
Esempio n. 3
0
        private void OnExit(UITooltipReceiver arg1, PointerEventData arg2)
        {
            //if (arg2.pointerCurrentRaycast.screenPosition != screenPosition)
            //	return;

            _engaged = false;
            onDisengaged.Invoke();
        }
Esempio n. 4
0
        private void OnDown(UITooltipReceiver arg1, PointerEventData arg2)
        {
            if (arg2.pointerCurrentRaycast.screenPosition != screenPosition)
            {
                return;
            }

            downState = true;
            if (_engaged)
            {
                onDisengaged.Invoke();
            }
        }
Esempio n. 5
0
        private void OnUp(UITooltipReceiver arg1, PointerEventData arg2)
        {
            if (arg2.pointerCurrentRaycast.screenPosition != screenPosition)
            {
                return;
            }

            downState = false;
            if (_engaged && enabled)
            {
                SetPivot();
                SetAnchoredPosition();
                onEngaged.Invoke();
            }
        }
Esempio n. 6
0
        private void OnEnter(UITooltipReceiver arg1, PointerEventData arg2)
        {
            if (arg2.dragging || arg2.pointerCurrentRaycast.screenPosition != screenPosition)
            {
                return;
            }

            _engaged = true;
            SetPivot();
            SetAnchoredPosition();
            if (!downState)
            {
                onEngaged.Invoke();
            }
            if (arg1 != _receiver)
            {
                _receiver = arg1;
                onReceiverChanged.Invoke(_receiver);
            }
        }
Esempio n. 7
0
 private void OnPointerUp(UITooltipReceiver receiver, PointerEventData eventData)
 {
     onUp?.Invoke(receiver, eventData);
 }
Esempio n. 8
0
 private void OnPointerDown(UITooltipReceiver receiver, PointerEventData eventData)
 {
     onDown?.Invoke(receiver, eventData);
 }