Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Mourkain on April 02, 2015, 06:41:59 AM

Title: UIButton - OnTouchBegan?
Post by: Mourkain on April 02, 2015, 06:41:59 AM
Hey guys,

i made a small game where you have to flip same cards very fast. Every Card had a UIButton on it.
I'm using the standard OnClick to detect the touches, but this method is pretty slow. Is there something like
OnTouchBegan?

Cheers
Title: Re: UIButton - OnTouchBegan?
Post by: ArenMook on April 04, 2015, 03:56:32 AM
Yes. OnPress(bool isPressed)

You can use that built-in notification that NGUI sends to colliders, or attach UIEventTrigger and use its On Press / On Release delegates.