UI.gd 466 B

12345678910111213141516171819202122232425262728
  1. class_name UI
  2. extends Control
  3. onready var game_over_panel = $GameOverPanel
  4. onready var tutorial_panel = $TutorialPanel
  5. func hide_tutorial() -> void:
  6. if tutorial_panel:
  7. tutorial_panel.queue_free()
  8. tutorial_panel = null
  9. func show_end_of_game() -> void:
  10. game_over_panel.show()
  11. func _on_Catcher_game_over() -> void:
  12. show_end_of_game()
  13. func _on_DeadLine_game_lost() -> void:
  14. show_end_of_game()
  15. func _on_Launcher_get_firing() -> void:
  16. hide_tutorial()