Button Fire Please help me

hi to all .

i have a little problem . i want to do a button fire like Input.GetMouseButtonDown when i touch an area it make me ONE fire . the code that i write work fine but make a conflit whit other button .

if (Input.GetMouseButtonDown (0)){BroadcastMessage("Fire");}

i try whhit this code but every cicle it make a me a fire .

for(touch in iPhoneInput.touches){ 
		var buttoneAccel = Rect (380,0,100,80);
		if (buttoneAccel.Contains(touch.position)){
			BroadcastMessage("Fire");		}	

	}

I saw that vombievile use the fire button I want to do.

AnyOne can help me ? Please :wink: :wink: :wink: :wink:

You’ll want to specify a touch phase, the begin phase might be what you are looking for. Try something like this:

for(touch in iPhoneInput.touches)
{
   var buttoneAccel = Rect (380,0,100,80);
   if(touch.phase == iPhoneTouchPhase.Begin)
   {
      if (buttoneAccel.Contains(touch.position))
         BroadcastMessage("Fire");     
   }
}

Thank you very much , you saved me .

the code work fine .

Thank you :smile: :smile: :smile: :wink: :wink: :wink: