you could do it how ive been doing it, its not the most elegant way and personally I like yours better
I set four variables 1 of which is just a reference to the progress bar
@onready var progressBar: ProgressBar = $ProgressBar
signal progress_completed
var progressLength: float = 0.0
var currentProgress: float = 0.0
func _ready() -> void:
progressBar.max_value = progressLength
progressBar.value = 0.0
func _process(delta : float) -> void:
if currentProgress < progressLength:
currentProgress += delta
progressBar.value = currentProgress
else:
emit_signal("progress_completed")
this is a much less elegant way to do what your doing but it does allow for custom signals also you could just use a timer timeout signal to trigger your custom signal to do what you want.
hope this helps and isn't just garbage