Appearance sets

This commit is contained in:
gamer147
2026-04-09 07:58:58 -04:00
parent b807e9897d
commit 6b46d1c274
23 changed files with 445 additions and 81 deletions

View File

@@ -59,7 +59,7 @@ func _on_unit_died(deployed: DeployedUnit) -> void:
func _process(_delta: float) -> void:
if _selected_unit and is_instance_valid(_selected_unit):
hp_bar.max_value = _selected_unit.unit.stats.max_hp
hp_bar.max_value = _selected_unit.current_stats.max_hp
hp_bar.value = _selected_unit.current_stats.current_hp
func _unhandled_input(event: InputEvent) -> void:
@@ -72,7 +72,7 @@ func _on_unit_selected_changed(deployed: DeployedUnit, selected: bool) -> void:
if selected:
_selected_unit = deployed
name_label.text = deployed.unit.info.name
hp_bar.max_value = deployed.unit.stats.max_hp
hp_bar.max_value = deployed.current_stats.max_hp
hp_bar.value = deployed.current_stats.current_hp
unit_panel.visible = true
else: