Trap explosions with damage and health bar depletion.
This commit is contained in:
15
scripts/healthbar.gd
Normal file
15
scripts/healthbar.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
class_name HealthBar extends TextureProgressBar
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
func _on_health_changed(current : int, max : int) -> void:
|
||||
max_value = max
|
||||
value = current
|
||||
Reference in New Issue
Block a user