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; }); }
private void EndTouch(InputAction.CallbackContext ctx) { OnEndTouch?.Invoke(controller.Controls.TouchPosition.ReadValue <Vector2>(), (float)ctx.time); }
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); }