I want to make a score system that shows a different score based on seconds.
if you have:
100 seconds remaining = 3 stars
50 seconds remaining = 2 stars
10< = 1 star with 0 seconds being 0 stars
The stars will be an image saved in the Assets.
thanks in advance
Tremayne
fafase
2
One way is to keep track of how much time has elapsed. But you want to stop that when pausing.
float timer = 60f;
void Update(){
if(pause)return;
if(gameOver){
CheckTime();
return;
}
timer -= Time.deltaTime;
}
void CheckTime(){
if(time >= 100) // Draw 3 stars
else if (time < 100 && time>= 50) //Draw 2 stars
// and so on
}