public DragEvent(float swipeLength, DragDirection dragDirection, float swipeSpeed, bool isDragEnded, DragInputLayerMask layerMask) { this.swipeLength = swipeLength; this.dragDirection = dragDirection; this.swipeSpeed = swipeSpeed; this.isDragEnded = isDragEnded; this.layerMask = layerMask; }
private void onRayCastHit(Touch touch, DragInputLayerMask layerMask) { dragInputLayerMask = DragInputLayerMask.BoyFriendMask; if (touch.phase == TouchPhase.Began) { SetInitialTouchPosition(touch.position); } else if (touch.phase == TouchPhase.Moved) { UpdateTouchPosition(touch.position); } else if (touch.phase == TouchPhase.Ended || touch.phase == TouchPhase.Canceled) { EndTouch(touch.position); } }