i need to count touches in left and ride side of android screen
this my code to control player
if (Input.touchCount > 0) {
foreach (Touch touch in Input.touches) {
if(touch.position.x > Screen .width /2)
{
doattack();
}
else if (touch.position.x > Screen.width/2 ) {
playerjump();
}
}
}
if i tap left side of screen the player does attacks again and again so, i want to do attack for single touch and another attack for another touch. (Only in left side)