Side-Scrolling-Shooter/demo/godot/Scripts/heads_up_display.gd
CatAClock 0faf0fa7d7 Multiple things
Engine port 4.5
Textures were not working
Started the CPP
added a few other things
2025-06-11 19:34:06 -07:00

15 lines
383 B
GDScript

extends Control
# change the hud if the player takes damage
func _on_player_player_took_damage(Health: int):
match Health:
2:
get_node("Container/Sprite2D3").visible = false
1:
get_node("Container/Sprite2D2").visible = false
0:
get_node("Container/Sprite2D").visible = false
func _process(_delta: float):
get_node("Container/Label").text = str(Global.TotalScore)