diff options
| author | freddie-a <57713959+freddie-a@users.noreply.github.com> | 2022-10-30 01:07:18 +0100 |
|---|---|---|
| committer | freddie-a <57713959+freddie-a@users.noreply.github.com> | 2022-10-30 01:07:18 +0100 |
| commit | f146c1ade2831cf3de6de9828e1340eadc0af4fe (patch) | |
| tree | 3dc3d6e9fa8c5b88f268ea199049bea852c72a03 /HealthBar.gd | |
| parent | 4bc728ab527841dc20a6a0930ffb6046ca39c4f2 (diff) | |
Colour health bar
Diffstat (limited to 'HealthBar.gd')
| -rw-r--r-- | HealthBar.gd | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/HealthBar.gd b/HealthBar.gd index 91a5b8e..57e9283 100644 --- a/HealthBar.gd +++ b/HealthBar.gd @@ -16,5 +16,7 @@ func _ready(): # pass func _on_player_hit(delta): value -= delta * 20 + var styleBox = self.get("custom_styles/fg") + styleBox.bg_color = Color.from_hsv((value) / 300, 1.0, 1.0) if value == 0: emit_signal("player_dead") |
