Пример #1
0
        void ObserveEndTouch(Touch touch)
        {
            gameObject.ExecOnActive(() => {
                if (_isFocus)
                {
                    OnEndTouch?.Invoke(touch);
                    bool isInside = IsInside(touch.ScreenPos);
                    if (isInside)
                    {
                        OnEndTouchInside?.Invoke(touch);
                    }
                    else
                    {
                        OnEndTouchOutside?.Invoke(touch);
                    }
                }

                _isFocus = false;
            });
        }
Пример #2
0
 private void EndTouch(InputAction.CallbackContext ctx)
 {
     OnEndTouch?.Invoke(controller.Controls.TouchPosition.ReadValue <Vector2>(), (float)ctx.time);
 }
Пример #3
0
 private void EndTouch(InputAction.CallbackContext context)
 {
     Debug.Log("Touch ended " + _touchControls.Touch.TouchPosition.ReadValue <Vector2>());
     DetectObject();
     OnEndTouch?.Invoke(_touchControls.Touch.TouchPosition.ReadValue <Vector2>(), (float)context.time);
 }