10 lines
331 B
GDScript
10 lines
331 B
GDScript
extends Control
|
|
|
|
onready var scene = $"/root/scene" as GameInstance
|
|
|
|
func set_current_charge(val):
|
|
$Container/CurrentBox/HBoxContainer/CurrentChargeLabel.text = "(" + str(round(val/10)/100) + "kJ)"
|
|
$Container/CurrentBox/ProgressBar.value = val
|
|
|
|
func set_max_charge(val: float):
|
|
$Container/CurrentBox/ProgressBar.max_value = val
|