Fixed Bugs; Added Score overview

This commit is contained in:
Exobyt 2024-08-20 12:17:51 +02:00
parent fdfb6a7d39
commit 6d71780f36
9 changed files with 152 additions and 33 deletions

View file

@ -2,4 +2,19 @@ extends Node
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
loadGrid()
func _physics_process(delta: float) -> void:
if get_children() != []:
if GLOBAL.lost and get_child(0).name == "Grid":
scoreOverview()
func loadGrid():
if $ScoreOverview != null:
$ScoreOverview.queue_free()
add_child(load("res://scenes/Grid/grid.tscn").instantiate())
func scoreOverview():
if $Grid != null:
$Grid.queue_free()
add_child(load("res://scenes/ScoreOverview/score_overview.tscn").instantiate())