Button Fix!
1 day left for the jury and I solved the touch/ button issue. With a little help from our TA Servet Ulaş I was able to edit the script correctly and get the getTouch command working. the buttons are now used for changing the scene with the touch input.
here the code:
var shot:Transform;
var recoveryTime = 10;
private var delay = 0;
function Update () {
print(“test”);
if (delay>0){delay -=1;}
if (delay==0){
if(Input.touchCount == 1){
var currentTouch:Touch = Input.touches[0];
if(currentTouch.phase == TouchPhase.Began && guiTexture.HitTest(currentTouch.position)){
Application.LoadLevel (1);
delay = recoveryTime;
} print (currentTouch.phase); //
}
}
}
Advertisement