Improved graphics. Added game over scene
This commit is contained in:
15
GameOver.gd
Normal file
15
GameOver.gd
Normal 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")
|
||||
Reference in New Issue
Block a user