Improved graphics. Added game over scene

This commit is contained in:
2024-05-05 13:42:51 +01:00
parent 5a40233292
commit fef3ae9d8e
24 changed files with 392 additions and 48 deletions

15
GameOver.gd Normal file
View File

@@ -0,0 +1,15 @@
extends Node2D
func _ready() -> void:
EventBus.update_score.connect(_on_update_score)
_on_update_score(Global.score)
func _on_timer_timeout() -> void:
get_tree().change_scene_to_file("res://Intro.tscn")
func _on_update_score(score : int) -> void:
$VBoxContainer/ScoreBox.text = "%08d" % score
func _on_game_over_sound_finished() -> void:
get_tree().change_scene_to_file("res://Intro.tscn")