summaryrefslogtreecommitdiff
path: root/hp_bar.gd
diff options
context:
space:
mode:
Diffstat (limited to 'hp_bar.gd')
-rw-r--r--hp_bar.gd5
1 files changed, 5 insertions, 0 deletions
diff --git a/hp_bar.gd b/hp_bar.gd
index e8c304f..9df85e8 100644
--- a/hp_bar.gd
+++ b/hp_bar.gd
@@ -18,6 +18,11 @@ func init(health):
func set_value(value):
value_difference = $HealthBar.value - value
$HealthBar.value = value
+
+ if $HealthBar.max_value == $HealthBar.value:
+ visible = false
+ else:
+ visible = true
func _on_health_bar_value_changed(value: float) -> void: