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())

View file

@ -1,15 +1,6 @@
[gd_scene load_steps=4 format=3 uid="uid://bq5hrqgv0f6hp"]
[gd_scene load_steps=2 format=3 uid="uid://bq5hrqgv0f6hp"]
[ext_resource type="PackedScene" uid="uid://dwl4lotl1d3ij" path="res://scenes/Grid/grid.tscn" id="1_88eap"]
[ext_resource type="Script" path="res://scenes/Main/main.gd" id="1_dtde6"]
[ext_resource type="PackedScene" uid="uid://c03h0nwewolfx" path="res://scenes/Grid/SpeedScale.tscn" id="2_mnoeo"]
[node name="main" type="Node"]
script = ExtResource("1_dtde6")
[node name="Grid" parent="." instance=ExtResource("1_88eap")]
position = Vector2(128, 256)
[node name="Node2D" parent="." instance=ExtResource("2_mnoeo")]
visible = false
position = Vector2(960, 896)