progress bar

This commit is contained in:
Eefschmeef2310 2024-09-27 15:19:10 +10:00
parent 8b83cc6bd2
commit 0bdd74e94a
12 changed files with 327 additions and 33 deletions

View file

@ -1,10 +1,17 @@
extends ProgressBar
@export var speed : float = 2
@export var target_value : float
func _ready():
max_value = 60000
func _process(delta: float) -> void:
value = lerp(value, 100.0, speed * delta)
value = lerp(value, target_value, speed * delta)
func _on_visibility_changed() -> void:
if visible:
value = 0
$Timer.start(0)
func _on_timer_timeout() -> void:
value = 0