Ejemplo n.º 1
0
    public static ProcessedInput ProcessSlideInput(Touch touch)
    {
        var processedInput = new ProcessedInput();

        processedInput.tapCount = touch.tapCount;
        processedInput.phase    = touch.phase;

        Vector2 touchLoc = touch.deltaPosition;

        return(processedInput);
    }
Ejemplo n.º 2
0
    public static ProcessedInput ProcessTapInput(Touch touch)
    {
        var processedInput = new ProcessedInput();

        processedInput.tapCount = touch.tapCount;
        processedInput.phase    = touch.phase;

        Vector2 touchLoc = touch.position;

        touchLoc.x /= Camera.main.pixelWidth;
        touchLoc.y /= Camera.main.pixelHeight;
        processedInput.touchLocation = touchLoc;

        return(processedInput);
    }