Side-Scrolling-Shooter/demo/godot/Scripts/heads_up_display.gd

17 lines
458 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)
func _on_wave_system_waves_finished() -> void:
print("We are done here.")