Hello,
First of all sorry for the title, I really couldn’t came up with a good title xD
I have made a point system, included with GUI.Label. I don’t like the look of those numbers in game.
So I want to make it that if I have ‘‘1’’ point, there will come up a sprite with the number 1, which looks better.
I know how to make it because I already made it with my countdown system aswell.
In my countdown system it looked like this:
float timeRemaining = 4.0f;
void Update () {
timeRemaining -= Time.deltaTime;
}
void OnGUI(){
if (timeRemaining > 2 && timeRemaining < 3)
count3.SetActive (true);
else
count3.SetActive(false);
if(timeRemaining > 0 && timeRemaining < 1)
count1.SetActive(true);
else
count1.SetActive(false);
if(timeRemaining > 1 && timeRemaining < 2)
count2.SetActive(true);
else
count2.SetActive(false);
if(timeRemaining > 0){
GUI.Label(new Rect(600, 600, 1000, 600),
"Time Remaining : "+timeRemaining);
}
else{
GUI.Label(new Rect(600, 600, 1000, 600), "Time's Up");
Application.LoadLevel ("InGame");
}
}
}
(count1,2,3 are sprites)
But if I have a point system, the player can reach points like 27, 99, 375, 214, 69 and more…
Its isnt really nice to write that all out and use tons of sprites (for every number).
Instead of that I want to only have the numbers 0,1,2,3,4,5,6,7,8,9 and if I reach number 12, as example, there will come number 12 automaticly (with the sprites 1 and 2). And if I have number 235… yeah you understand it…
Is this possible, or is there a better way to do this?
Thank you.


