mirror of
https://port.numenaute.org/aleajactaest/bazar_alea.git
synced 2024-11-26 00:56:21 +00:00
17 lines
359 B
GDScript
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
|