Appearance sets
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user