extends Control

const MAX_TIME = 99

@export var start_time = 50
@export var decrease_speed = 0.5

# Called when the node enters the scene tree for the first time.
func _ready():
	current_time = start_time;
	$Label.text = str(int(current_time))

var current_time: float
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	current_time -= decrease_speed * delta
	$Label.text = str(int(current_time))

func get_percentage() -> float:
	return inverse_lerp(MAX_TIME, 0, int(current_time))
