game: add shader to indicate low hp

This commit is contained in:
2025-08-21 02:10:09 +02:00
parent 632643a130
commit 8f02850a73
7 changed files with 92 additions and 1 deletions

View File

@@ -51,6 +51,7 @@ func take_damage(value: float) -> void:
dm.damage_taken = value
dm.player_damage = false
add_child(dm)
GlobalConst.sig_on_player_hp_change.emit(current_hp, max_hp)
main_ui.player_ui.update_hp()
if player_stats.current_health <= 0:
die()