extends Node2D

func _physics_process(delta):
	var base_health : String = str(int(clamp($"../Defence Game/MyBase".health, 0, 100)))
	
	while len(base_health) < 3:
		base_health = "0" + base_health
	
	$AnimatedSprite.frame = int(base_health[0])
	$AnimatedSprite2.frame = int(base_health[1])
	$AnimatedSprite3.frame = int(base_health[2])
