Per animare un contatore di score, bisogna usare uno script e sfruttare il "delta" fornito dalla funzione "process".
Questo lo script di esempio:
var finished = true
var time = 0.0
var time_to_current_score = 2.0
var a = true
var score = 1001
func _process(delta):
if finished and a:
time += delta
text = str(int(time / time_to_current_score * score))
if time >= time_to_current_score:
a = false
text = str(score)
Nessun commento:
Posta un commento