extends Node2D

export var score : float = 0

func _physics_process(delta):
	score = max(score, 0)
	
	var score_string : String = str(int(clamp(score, 0, 99999)))
	
	while len(score_string) < 5:
		score_string = "0" + score_string
	
	$AnimatedSprite.frame = int(score_string[0])
	$AnimatedSprite2.frame = int(score_string[1])
	$AnimatedSprite3.frame = int(score_string[2])
	$AnimatedSprite4.frame = int(score_string[3])
	$AnimatedSprite5.frame = int(score_string[4])
