mirror of
https://port.numenaute.org/aleajactaest/bazar_alea.git
synced 2024-09-19 19:20:34 +00:00
18 lines
357 B
GDScript3
18 lines
357 B
GDScript3
|
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
|