bazar_alea/client/player/Attributes/HealthAttribute.gd
2023-11-19 20:41:38 +01:00

17 lines
359 B
GDScript

extends GameAttribute
class_name HealthAttribute
@export_category("Visual Bar")
@export var health_bar : ProgressBar
func set_attribute(_prev_v, current_v):
if !attributes_manager:
return
if current_v <= 0.0: # and not dead
pass #death
func _process(_delta):
if health_bar:
health_bar.max_value = maximum_value
health_bar.value = current_value