Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - longbottomup

Pages: [1]
1
NGUI 3 Support / Re: Follow UISpite type: Filled
« on: January 30, 2015, 11:10:57 AM »
I'm not sure, but I think, you must calculate your dynamic distance (radius) based on image pixels count for current angle.

Thank you for your help.

2
NGUI 3 Support / Re: Follow UISpite type: Filled
« on: January 30, 2015, 05:51:45 AM »
Hi!

You can try something like this:

  1. public class Test : MonoBehaviour
  2. {
  3.     public UISprite FilledSprite;
  4.     public UISprite MarkSprite;
  5.  
  6.     private float _radius;
  7.  
  8.     void Start()
  9.     {
  10.         _radius = FilledSprite.width / 2f;
  11.     }
  12.  
  13.     void Update()
  14.     {
  15.         var amount = 1 - FilledSprite.fillAmount;
  16.         var angle = 360 * amount;
  17.  
  18.         var radAngle = angle * Mathf.Deg2Rad;
  19.  
  20.         MarkSprite.transform.localPosition = new Vector3(
  21.             Mathf.Sin(radAngle) * _radius,
  22.             Mathf.Cos(radAngle) * _radius,
  23.             0f);
  24.     }
  25. }
  26.  

Thank you for your help, but if i change my sprite by this image:

How about that? Please tell give a solution. Thank you.

3
NGUI 3 Support / Follow UISpite type: Filled
« on: January 30, 2015, 12:12:07 AM »
Here is NGUI-UISprite type Filled, Fill Dir: Radial 360:

Yes, now i want like this:

I want to UISprite or something else follow the fill amount. Someone can help, thank you very much.

4
NGUI 3 Support / Filled CountDown with point?
« 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:

My circle countdown working as well, but i want to attach point like that(texture2D) on runtime. Thank you.

Pages: [1]