Fixed many Bugy and added Labels for Time and Score

This commit is contained in:
Exobyt 2024-08-20 00:34:24 +02:00
parent 632eeddc64
commit ee5e17c3e0
14 changed files with 430 additions and 179 deletions

View file

@ -1,9 +1,13 @@
[gd_scene load_steps=3 format=3 uid="uid://bq5hrqgv0f6hp"]
[gd_scene load_steps=6 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"]
[ext_resource type="LabelSettings" uid="uid://cd783ubpcytc8" path="res://Theme/label.tres" id="3_jopb4"]
[ext_resource type="Script" path="res://scenes/Main/score_value.gd" id="3_vtvng"]
[node name="main" type="Node"]
script = ExtResource("1_dtde6")
[node name="Grid" parent="." instance=ExtResource("1_88eap")]
position = Vector2(128, 256)
@ -13,4 +17,63 @@ visible = false
position = Vector2(960, 896)
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2(448, 800)
position = Vector2(448, 896)
[node name="CanvasLayer" type="CanvasLayer" parent="Camera2D"]
[node name="Control" type="Control" parent="Camera2D/CanvasLayer"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="HBoxContainer" type="HBoxContainer" parent="Camera2D/CanvasLayer/Control"]
layout_mode = 1
offset_left = 56.0
offset_top = 64.0
offset_right = 266.0
offset_bottom = 152.0
[node name="Score" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer"]
layout_mode = 2
text = "Score: "
label_settings = ExtResource("3_jopb4")
horizontal_alignment = 1
vertical_alignment = 1
[node name="ScoreValue" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer"]
layout_mode = 2
label_settings = ExtResource("3_jopb4")
horizontal_alignment = 1
script = ExtResource("3_vtvng")
[node name="HBoxContainer2" type="HBoxContainer" parent="Camera2D/CanvasLayer/Control"]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -376.0
offset_top = 64.0
offset_right = -128.0
offset_bottom = 152.0
grow_horizontal = 0
[node name="Time" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer2"]
layout_mode = 2
text = "Time: "
label_settings = ExtResource("3_jopb4")
horizontal_alignment = 1
vertical_alignment = 1
[node name="TimeValue" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer2"]
layout_mode = 2
label_settings = ExtResource("3_jopb4")
horizontal_alignment = 1
vertical_alignment = 1
[node name="GameTimer" type="Timer" parent="."]
autostart = true
[connection signal="timeout" from="GameTimer" to="." method="_on_game_timer_timeout"]