Title: Re: Button (finger on button action) like touch.stationary how ?
Post by: Daemon on June 30, 2014, 02:40:28 PM
Hi ArenMook,
Could you explain your code a bit more ? May be I'm not so experience but I don't understand what does it mean ? I need to solve the same problem as Hotshots I need something as touch.stationary. Thank you for your reply.
Title: Re: Button (finger on button action) like touch.stationary how ?
Post by: Nicki on June 30, 2014, 07:21:30 PM
OnPress(bool pressed) is called by the NGUI event system, which is triggered by you touching the screen.
The code saves when it is pressed down.
It does stuff in Update() which is called every frame if the code is in PressedDown state (mIsPressed == true).
When you lift your finger, a OnPress(false) call is made by the event system, which sets mIsPressed to false, which stops the update loop from doing its thing.
Does that explain it to you?
Title: Re: Button (finger on button action) like touch.stationary how ?
Post by: Daemon on July 24, 2014, 05:47:05 PM
Hi Nicki,
Thank you very much for your explanation. I tested it and it works perfectly :). I unfortunately didn't know this important fact about OnPress trigger. Could you send me a link where can I get such similar usefull information ? I thing that I have read documentation quite carefully but I didn't notice any information about this system. Thank you.
Title: Re: Button (finger on button action) like touch.stationary how ?
Post by: ArenMook on July 25, 2014, 02:24:50 AM