This repository has been archived on 2020-09-30. You can view files and clone it, but cannot push or open issues or pull requests.
2020-07-07 18:42:22 +00:00
|
|
|
extends Control
|
|
|
|
|
|
|
|
onready var scene = $"/root/scene" as GameInstance
|
|
|
|
|
2020-07-09 14:50:34 +00:00
|
|
|
func set_current_charge(val):
|
2020-07-14 21:28:13 +00:00
|
|
|
$Container/CurrentBox/HBoxContainer/CurrentChargeLabel.text = "(" + str(round(val/10)/100) + "MJ)"
|
2020-07-09 14:50:34 +00:00
|
|
|
$Container/CurrentBox/ProgressBar.value = val
|
|
|
|
|
|
|
|
func set_max_charge(val: float):
|
2020-07-09 15:12:18 +00:00
|
|
|
$Container/CurrentBox/ProgressBar.max_value = val
|
2020-07-14 21:28:13 +00:00
|
|
|
|
|
|
|
func init_values(max_charge: float, max_discharge: float):
|
|
|
|
$Container/ChargeBox/SpinBox.value = int(max_charge)
|
|
|
|
$Container/ChargeBox/SpinBox2.value = int(max_discharge)
|