I have created a game in for web which works with OnMouseDown. I have just got my Android Licence and now converting it to Android.
Is there a function similar to OnMouseDown but for OnTouch?
The code I am trying is on a GUITexture.
function OnMouseDown () {
Application.Quit();
}
function Update(){
if(Input.touchCount == 1){
//Application.Quit();
}
}
Its picking up the fact there has been a touch and it moves on but I have another GUITexture with
function OnMouseDown(){
Application.LoadLevel("Credits");
}
function Update(){
if(Input.touchCount == 1){
Application.LoadLevel("Credits");
}
}
But no matter where I click its always doing the credits instead of the GUITexture I am touching.
Any help would be appreciated. Thanks