match-3 grid generation

make game scene modular
global debug mode
This commit is contained in:
2025-09-24 10:45:14 +04:00
parent 122b5cb55f
commit afc808f0d6
21 changed files with 506 additions and 94 deletions

View File

@@ -1,27 +1,74 @@
[gd_scene load_steps=5 format=3 uid="uid://dmwkyeq2l7u04"]
[gd_scene load_steps=4 format=3 uid="uid://dmwkyeq2l7u04"]
[ext_resource type="Script" uid="uid://b16jnk7w22mb" path="res://scenes/game/game.gd" id="1_uwrxv"]
[ext_resource type="PackedScene" uid="uid://b4kv7g7kllwgb" path="res://scenes/match3/match3.tscn" id="2_yqjtg"]
[ext_resource type="PackedScene" path="res://scenes/ui/DebugToggle.tscn" id="3_debug"]
[ext_resource type="PackedScene" uid="uid://fax5m4ywp1r3" path="res://scenes/ui/DebugMenu.tscn" id="4_debug_menu"]
[ext_resource type="Texture2D" uid="uid://c8y6tlvcgh2gn" path="res://assets/textures/backgrounds/beanstalk-dark.webp" id="5_background"]
[node name="Game" type="Node"]
[node name="Game" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_uwrxv")
[node name="Background" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("5_background")
stretch_mode = 1
[node name="UI" type="Control" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="ScoreDisplay" type="Label" parent="UI"]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 10.0
offset_top = -31.0
offset_right = 110.0
offset_bottom = -10.0
grow_vertical = 0
text = "Score: 0"
[node name="GameplayContainer" type="Control" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="BackButtonContainer" type="Control" parent="."]
layout_mode = 3
layout_mode = 1
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
offset_left = 10.0
offset_top = 10.0
offset_right = 55.0
offset_bottom = 41.0
[node name="BackButton" type="Button" parent="BackButtonContainer"]
layout_mode = 0
offset_right = 45.0
offset_bottom = 31.0
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
text = "back"
[node name="Match3" parent="." instance=ExtResource("2_yqjtg")]
[node name="DebugToggle" parent="." instance=ExtResource("3_debug")]
layout_mode = 1
[node name="DebugMenu" parent="." instance=ExtResource("4_debug_menu")]
[connection signal="pressed" from="BackButtonContainer/BackButton" to="." method="_on_back_button_pressed"]