internal void ProcessTouch(ref TouchModel touchState) { if (!touchState.changedThisFrame) { return; } var eventData = GetOrCreateCachedPointerEvent(); eventData.Reset(); touchState.CopyTo(eventData); eventData.pointerCurrentRaycast = (touchState.selectPhase == TouchPhase.Canceled) ? new RaycastResult() : PerformRaycast(eventData); eventData.button = PointerEventData.InputButton.Left; ProcessMouseButton(touchState.selectDelta, eventData); ProcessMouseMovement(eventData); ProcessMouseButtonDrag(eventData); touchState.CopyFrom(eventData); touchState.OnFrameFinished(); }
public RegisteredTouch(Touch touch, int deviceIndex) { touchId = touch.fingerId; model = new TouchModel(deviceIndex); isValid = true; }