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

View File

@@ -2,7 +2,17 @@ extends Node2D
func _ready() -> void:
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
EventBus.update_score.connect(_on_update_score)
EventBus.update_highscore.connect(_on_update_highscore)
_on_update_score(Global.score)
_on_update_highscore(Global.highscore)
func _on_button_pressed() -> void:
get_tree().change_scene_to_file("res://Dunkanoid.tscn")
func _on_update_score(score : int) -> void:
$HBoxContainer/Score/ScoreBox.text = "%08d" % score
func _on_update_highscore(score : int) -> void:
$HBoxContainer/HighScore/HighScoreBox.text = "%08d" % score