chore: run gdformat
This commit is contained in:
@@ -4,15 +4,18 @@ extends Control
|
||||
@onready var hp_bar: ProgressBar = $CenterContainer/VBoxContainer/ProgressBar
|
||||
@onready var elapsed_label: Label = $CenterContainer/VBoxContainer/ElapsedLabel
|
||||
|
||||
|
||||
func set_hp(value: float):
|
||||
hp_bar.value = value
|
||||
|
||||
|
||||
func set_elapsed_time(value: float):
|
||||
elapsed_label.text = format_time(value)
|
||||
|
||||
|
||||
|
||||
func format_time(seconds: float) -> String:
|
||||
var total_ms = int(seconds * 1000.0)
|
||||
var s = (total_ms / 1000) % 60
|
||||
var m = (total_ms / 60000)
|
||||
var m = total_ms / 60000
|
||||
|
||||
return "%02d:%02d" % [m, s]
|
||||
|
Reference in New Issue
Block a user