1

I've looked around for various swiping-related answers, and could not find anything that suited me directly.

The idea is to swipe left to increment an integer variable, and left to decrement it. I have it working for buttons, and would simply like to convert it for a touch input.

The current script is as follows:

private void Buttons(){
        if (GUI.Button (new Rect (1080,80, 40, 220), "Next")) {
        screenNumber ++;
    }
        if (GUI.Button (new Rect (160,80, 40, 220), "Back")) {
        screenNumber --;
    }       
}

*screenNumber is the name of the int variable.

I am developing for Android, if that is important for this functionality.

Thanks in advance!

4

1 回答 1

0

我一直在使用FingerGestures进行鼠标和触摸控制。我强烈推荐它,特别是对于无痛触摸/移动开发。

于 2013-04-25T11:31:30.767 回答