So i want to cancel invoke if touch is defected or joystick axis used(or mouse or keyboard used too). For touch i use unity plug in xtuio.com So what i got
InvokeRepeating("levels3", 20,0.1);
function Update () {
if(Input.anyKeyDown||EventType.MouseDown ){
CancelInvoke();
}
function levels3(){
Application.LoadLevel(levels2);
}
Any ides or help haw to detect touch and joystick?
so i got cancelivoke working from joystick axis, that all i need from it.
var axes = new float[9];
function Update(){
for (var i = 1; i <9; i++) {
var position = Input.GetAxis(“Axis” + i);
if (axes != position) {
_ axes = position;_