Beispiel #1
0
        public void OnPointerDown(PointerEventData eventData)
        {
            Touch touch = new Touch(eventData);

            _touches[eventData.pointerId] = touch;
            OnStartTouch?.Invoke(touch);
        }
Beispiel #2
0
 void ObserveStartTouch(Touch touch)
 {
     gameObject.ExecOnActive(() => {
         _isFocus = IsInside(touch.ScreenPos);
         if (_isFocus)
         {
             OnStartTouch?.Invoke(touch);
         }
     });
 }
Beispiel #3
0
 private void StartTouch(InputAction.CallbackContext ctx)
 {
     OnStartTouch?.Invoke(controller.Controls.TouchPosition.ReadValue <Vector2>(), (float)ctx.startTime);
 }
Beispiel #4
0
 private void StartTouch(InputAction.CallbackContext context)
 {
     Debug.Log("Touch started " + _touchControls.Touch.TouchPosition.ReadValue <Vector2>());
     OnStartTouch?.Invoke(_touchControls.Touch.TouchPosition.ReadValue <Vector2>(), (float)context.startTime);
 }