Author Topic: UIButton - OnTouchBegan?  (Read 4937 times)

Mourkain

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 4
    • View Profile
UIButton - OnTouchBegan?
« 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

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIButton - OnTouchBegan?
« Reply #1 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.