Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: longbottomup on December 23, 2014, 10:43:27 PM

Title: Filled CountDown with point?
Post by: longbottomup on December 23, 2014, 10:43:27 PM
Hi Aren, hope you well,
I have a question. Can you tell me how to make a effect countdown like this:
(http://i.imgur.com/FLlqBvi.png?1)
My circle countdown working as well, but i want to attach point like that(texture2D) on runtime. Thank you.
Title: Re: Filled CountDown with point?
Post by: Nicki on December 24, 2014, 12:39:10 PM
Attaching the point is tricky. I don't think you can get an "auto-placement" like thumb on the slider; you likely have to calculate it yourself. Luckily, you know the values so it should be a trivial calculation.
Title: Re: Filled CountDown with point?
Post by: ArenMook on December 27, 2014, 09:23:50 AM
Yup, as Nicki pointed out, knowing the center, the radius, and the angle (360 * slider.value), you can easily calculate where the point should be located using basic math.