Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 public RegisteredTouch(Touch touch, int deviceIndex)
 {
     touchId = touch.fingerId;
     model   = new TouchModel(deviceIndex);
     isValid = true;
 }