iPhone easy button handling
Easiest method I could come up with for easy GUITexture as button work:
static var braking : boolean;
function Update () {
for(touch in iPhoneInput.touches){
if(touch.phase == iPhoneTouchPhase.Began){
if (guiTexture.GetScreenRect().Contains(touch.position)){
guiTexture.color=Color(.2,.2,.2,.5);
braking = true;
}
}
if(touch.phase == iPhoneTouchPhase.Ended){
guiTexture.color=Color(.5,.5,.5,.5);
braking = false;
}
}
}
[...] iPhone Easy Button Handling- from the Unity Update Method -via pixelplacement.com [...]
[...] iPhone Easy Button Handling- from the Unity Update Method -via pixelplacement.com [...]
[...] iPhone Easy Button Handling- from the Unity Update Method -via pixelplacement.com [...]
[...] iPhone Easy Button Handling- from the Unity Update Method -via pixelplacement.com [...]