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 - holmiboii

Pages: [1]
1
NGUI 3 Support / Re: Displaying Int value with Sprites?
« on: October 16, 2014, 05:29:23 PM »
Thanks for the quick reply, I guess that I wasn't clear enough..
The thing is the "Health" is in two digits. So I'm using numbers 0 - 9.
Every player got 20 health to start off with, they are divided, so the number 2 and 0 are stored in the same int, but not the sprites.
Etc:
|2| |0|
|1| |9|
|0| |9|

2
NGUI 3 Support / Displaying Int value with Sprites?
« on: October 16, 2014, 01:24:54 PM »
Hello People! I was just wondering is there any way to convert my "Health value" that is stored in a Int could be displayed in runtime as Sprites?
The Sprites are in a NGui atlas so.. thought?

3
Edit:
I basicly have no idea how to convert a string or bool of the value 20 to become displayed with sprites. From there I could make a NumberHandler of some sort with [SerializeField] adding sprites to the numbers, it will only need to hold 10 different. Now I have a button that will make you able to remove 1 point or add 1 point.
When you remove one point the health value will be 19. That would mean I need to find the sprites 1 and 9 and place them on correctly.. Thoughs or anyone willing to help?
Thanks alot!  :)

Pages: [1]