private void OnTouchMoved(int touchID, Vector2 touchPosition)
    {
        touchesUpPosition[touchID] = touchPosition;

        swipeDetector.DetectSwipe(touchID, touchesUpPosition[touchID], touchesDownPosition[touchID], TouchPhase.Moved);
        if (swipeDetector.swiped[touchID])
        {
            touchesDownPosition[touchID] = touchesUpPosition[touchID];
        }
    }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        Touch[] touches = Input.touches;

        detector.DetectSwipe(ref touches, SwipeDirection.Right, swipeRight, 50f);
        //detector.DetectSwipe(ref touches, SwipeDirection.Left, swipeLeft, 5f);
    }