diff options
| author | Logan B <113468801+LoganLDB@users.noreply.github.com> | 2022-10-29 22:07:20 +0100 |
|---|---|---|
| committer | Logan B <113468801+LoganLDB@users.noreply.github.com> | 2022-10-29 22:07:20 +0100 |
| commit | 50b7eb11fe309582002d2fb70742d1c1e6d03d92 (patch) | |
| tree | 620567e5f0b3c80c28f6bc2b4e2e7ba260699e23 /HealthBar.gd | |
| parent | b40da120e30d4521736c99392c08e97de2da34ae (diff) | |
| parent | 553e6d8a818a33195dbf1d01cb517e46fac7996e (diff) | |
Merge branch 'master' of https://github.com/LMBishop/bazzagazza
Diffstat (limited to 'HealthBar.gd')
| -rw-r--r-- | HealthBar.gd | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/HealthBar.gd b/HealthBar.gd index ae4ce42..91a5b8e 100644 --- a/HealthBar.gd +++ b/HealthBar.gd @@ -4,11 +4,11 @@ extends ProgressBar # Declare member variables here. Examples: # var a = 2 # var b = "text" - +signal player_dead # Called when the node enters the scene tree for the first time. func _ready(): - pass # Replace with function body. + connect("player_dead", get_node("/root/Main/HUD/Wordart"), "_on_player_dead") # Called every frame. 'delta' is the elapsed time since the previous frame. @@ -16,3 +16,5 @@ func _ready(): # pass func _on_player_hit(delta): value -= delta * 20 + if value == 0: + emit_signal("player_dead") |
