Graphical Overhaul

This commit is contained in:
Exobyt 2024-08-20 16:59:16 +02:00
parent b9eec60df7
commit 65bf9e0c86
15 changed files with 338 additions and 23 deletions

View file

@ -1,21 +1,34 @@
extends Node
@onready var scenes = $scenes
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
loadGrid()
loadStartMenu()
func _physics_process(delta: float) -> void:
if get_children() != []:
if GLOBAL.lost and get_child(0).name == "Grid":
if scenes.get_children() != []:
if GLOBAL.lost and scenes.get_child(0).name == "Grid":
scoreOverview()
func loadGrid():
if $ScoreOverview != null:
$ScoreOverview.queue_free()
add_child(load("res://scenes/Grid/grid.tscn").instantiate())
$Grid.toggleButton()
if $scenes/ScoreOverview != null:
$scenes/ScoreOverview.queue_free()
if $scenes/StartMenu != null:
$scenes/StartMenu.queue_free()
scenes.add_child(load("res://scenes/Grid/grid.tscn").instantiate())
$scenes/Grid.toggleButton()
func scoreOverview():
if $Grid != null:
$Grid.queue_free()
add_child(load("res://scenes/ScoreOverview/score_overview.tscn").instantiate())
if $scenes/Grid != null:
$scenes/Grid.queue_free()
if $scenes/StartMenu != null:
$scenes/StartMenu.queue_free()
scenes.add_child(load("res://scenes/ScoreOverview/score_overview.tscn").instantiate())
func loadStartMenu():
if $scenes/ScoreOverview != null:
$scenes/ScoreOverview.queue_free()
if $scenes/Grid != null:
$scenes/Grid.queue_free()
scenes.add_child(load("res://scenes/Menu/start_menu.tscn").instantiate())

View file

@ -1,6 +1,77 @@
[gd_scene load_steps=2 format=3 uid="uid://bq5hrqgv0f6hp"]
[gd_scene load_steps=3 format=3 uid="uid://bq5hrqgv0f6hp"]
[ext_resource type="Script" path="res://scenes/Main/main.gd" id="1_dtde6"]
[ext_resource type="Texture2D" uid="uid://cbuxv7iwn0qm7" path="res://assets/Blocks/Block.png" id="2_5ae6b"]
[node name="main" type="Node"]
script = ExtResource("1_dtde6")
[node name="ColorRect" type="ColorRect" parent="."]
show_behind_parent = true
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -832.0
offset_top = -1008.0
offset_right = 674.0
offset_bottom = -1991.0
grow_horizontal = 2
grow_vertical = 2
scale = Vector2(0.996259, 9.13391)
color = Color(0.000693898, 0.000693898, 0.000693898, 1)
[node name="CPUParticles2D" type="CPUParticles2D" parent="ColorRect"]
modulate = Color(1, 1, 1, 0.478431)
position = Vector2(1300.87, 37.6618)
scale = Vector2(0.501878, 0.054741)
amount = 20
lifetime = 5.0
preprocess = 5.0
speed_scale = 0.5
local_coords = true
texture = ExtResource("2_5ae6b")
emission_shape = 3
emission_rect_extents = Vector2(2000, 0)
spread = 0.0
tangential_accel_max = 100.0
damping_max = 100.0
scale_amount_max = 2.0
color = Color(1, 0, 0, 1)
[node name="CPUParticles2D2" type="CPUParticles2D" parent="ColorRect"]
modulate = Color(1, 1, 1, 0.478431)
position = Vector2(1300.87, 37.6618)
scale = Vector2(0.501878, 0.054741)
amount = 20
lifetime = 5.0
preprocess = 5.0
speed_scale = 0.5
local_coords = true
texture = ExtResource("2_5ae6b")
emission_shape = 3
emission_rect_extents = Vector2(2000, 0)
spread = 0.0
tangential_accel_max = 100.0
damping_max = 100.0
scale_amount_max = 2.0
color = Color(0, 0.0499997, 1, 1)
[node name="CPUParticles2D3" type="CPUParticles2D" parent="ColorRect"]
modulate = Color(1, 1, 1, 0.478431)
position = Vector2(1300.87, 37.6618)
scale = Vector2(0.501878, 0.054741)
amount = 20
lifetime = 5.0
preprocess = 5.0
speed_scale = 0.5
local_coords = true
texture = ExtResource("2_5ae6b")
emission_shape = 3
emission_rect_extents = Vector2(2000, 0)
spread = 0.0
tangential_accel_max = 100.0
damping_max = 100.0
scale_amount_max = 2.0
color = Color(0.966667, 1, 0, 1)
[node name="scenes" type="Node" parent="."]