Skip to content

Commit 338fb62

Browse files
committed
moved files
1 parent 66d2ff1 commit 338fb62

File tree

8 files changed

+98
-54
lines changed

8 files changed

+98
-54
lines changed

animated_cloud.tscn renamed to game/animated_cloud.tscn

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ tracks/0/keys = {
1717
"times": PackedFloat32Array(0, 30),
1818
"transitions": PackedFloat32Array(1, 1),
1919
"update": 0,
20-
"values": [Vector2(64, 90), Vector2(1936, 90)]
20+
"values": [Vector2(64, 220), Vector2(1936, 220)]
2121
}
2222

2323
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5m8mq"]
@@ -36,11 +36,14 @@ expand_mode = 2
3636

3737
[node name="Debug-Panel" type="Panel" parent="."]
3838
visible = false
39+
anchors_preset = 10
40+
anchor_right = 1.0
3941
offset_right = 2000.0
40-
offset_bottom = 180.0
42+
offset_bottom = 150.0
43+
grow_horizontal = 2
4144

4245
[node name="Sprite2D" type="Sprite2D" parent="."]
43-
position = Vector2(64, 90)
46+
position = Vector2(64, 220)
4447
texture = ExtResource("2_vo0va")
4548

4649
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]

game.gd renamed to game/game.gd

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ extends Node2D
22
# SCENES
33
@onready var game_board:GameBoard = $Board
44
@onready var game_stats:VBoxContainer = $GameStats
5+
@onready var game_top_h_box:HBoxContainer = $GameTopHBox
56

67
func _ready():
78
game_board.connect("props_updated_moves", self._on_props_updated_moves)
@@ -17,15 +18,11 @@ func _on_props_updated_gemsdict(gems_dict:Dictionary):
1718
game_stats.get_child(4).get_child(1).text = str(gems_dict["PURPLE"])
1819
game_stats.get_child(5).get_child(1).text = str(gems_dict["BROWN"])
1920

20-
func _on_props_updated_moves(moves:int):
21-
# TODO: name labels, then update base on this
22-
#game_stats.get_child(4).get_child(1).text = str(moves)
23-
print("TODO:") # TODO:
24-
2521
func _on_props_updated_score(score:int):
26-
# TODO: name labels, then update base on this
27-
#game_stats.get_child(5).get_child(1).text = str(score)
28-
print("TODO:") # TODO:
22+
game_top_h_box.get_child(0).get_child(1).text = str(score)
23+
24+
func _on_props_updated_moves(moves:int):
25+
game_top_h_box.get_child(1).get_child(1).text = str(moves)
2926

3027
func _on_newgame_button_pressed():
3128
game_board.new_game()

game.tscn renamed to game/game.tscn

Lines changed: 73 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[gd_scene load_steps=19 format=3 uid="uid://b5bfm2244ywxk"]
22

3-
[ext_resource type="Script" path="res://game.gd" id="1_ewnxx"]
3+
[ext_resource type="Script" path="res://game/game.gd" id="1_ewnxx"]
44
[ext_resource type="Texture2D" uid="uid://cnlqirgwr8d4" path="res://assets/bkgd/Background.png" id="1_h8otn"]
55
[ext_resource type="PackedScene" uid="uid://x4qq2j3l7nvb" path="res://game_board/board.tscn" id="2_2ltbx"]
6-
[ext_resource type="PackedScene" uid="uid://d0yw6oyw3qib0" path="res://animated_cloud.tscn" id="3_a1y13"]
6+
[ext_resource type="PackedScene" uid="uid://d0yw6oyw3qib0" path="res://game/animated_cloud.tscn" id="3_a1y13"]
77
[ext_resource type="Texture2D" uid="uid://b8biy2iputyhe" path="res://assets/gems/characters_0002.png" id="3_qywvx"]
88
[ext_resource type="Texture2D" uid="uid://duau66qew6757" path="res://assets/gems/characters_0001.png" id="3_sh4xh"]
9+
[ext_resource type="Theme" uid="uid://c58sv51ac2qkl" path="res://themes/game_top_label_theme.tres" id="4_1evut"]
910
[ext_resource type="Texture2D" uid="uid://vu6oui2n7024" path="res://assets/gems/characters_0003.png" id="4_2reex"]
10-
[ext_resource type="Theme" uid="uid://1cdmnqyil8gy" path="res://game_stats_label_theme.tres" id="4_xf0vf"]
11+
[ext_resource type="Theme" uid="uid://1cdmnqyil8gy" path="res://themes/game_stats_label_theme.tres" id="4_xf0vf"]
1112
[ext_resource type="Texture2D" uid="uid://byliae6aa6ki2" path="res://assets/gems/characters_0005.png" id="5_g428h"]
1213
[ext_resource type="Texture2D" uid="uid://2vrsevjv4w43" path="res://assets/gems/characters_0007.png" id="6_ot4tf"]
1314
[ext_resource type="Texture2D" uid="uid://b1o34xq1pq82y" path="res://assets/gems/characters_0006.png" id="7_o4d3d"]
@@ -20,10 +21,7 @@
2021
bg_color = Color(0, 0, 0, 0.666667)
2122

2223
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_k3sk6"]
23-
bg_color = Color(0, 0, 0, 0.2)
24-
25-
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_imdoc"]
26-
bg_color = Color(0, 0, 0, 0.411765)
24+
bg_color = Color(0, 0, 0, 0.133333)
2725

2826
[node name="Game" type="Node2D"]
2927
script = ExtResource("1_ewnxx")
@@ -47,18 +45,65 @@ grow_horizontal = 2
4745
grow_vertical = 2
4846
theme_override_styles/panel = SubResource("StyleBoxFlat_103kv")
4947

48+
[node name="GameTopBkgd" type="Panel" parent="."]
49+
anchors_preset = 10
50+
anchor_right = 1.0
51+
offset_right = 2000.0
52+
offset_bottom = 150.0
53+
grow_horizontal = 2
54+
theme_override_styles/panel = SubResource("StyleBoxFlat_k3sk6")
55+
56+
[node name="GameTopHBox" type="HBoxContainer" parent="."]
57+
custom_minimum_size = Vector2(2000, 150)
58+
offset_right = 40.0
59+
offset_bottom = 40.0
60+
61+
[node name="HBoxContainer1" type="HBoxContainer" parent="GameTopHBox"]
62+
layout_mode = 2
63+
size_flags_horizontal = 3
64+
65+
[node name="Label" type="Label" parent="GameTopHBox/HBoxContainer1"]
66+
layout_mode = 2
67+
size_flags_horizontal = 3
68+
theme = ExtResource("4_1evut")
69+
text = "Score "
70+
horizontal_alignment = 2
71+
72+
[node name="Value" type="Label" parent="GameTopHBox/HBoxContainer1"]
73+
layout_mode = 2
74+
size_flags_horizontal = 3
75+
theme = ExtResource("4_1evut")
76+
text = "0"
77+
78+
[node name="HBoxContainer2" type="HBoxContainer" parent="GameTopHBox"]
79+
layout_mode = 2
80+
size_flags_horizontal = 3
81+
82+
[node name="Label" type="Label" parent="GameTopHBox/HBoxContainer2"]
83+
layout_mode = 2
84+
size_flags_horizontal = 3
85+
theme = ExtResource("4_1evut")
86+
text = "Moves "
87+
horizontal_alignment = 2
88+
89+
[node name="Value" type="Label" parent="GameTopHBox/HBoxContainer2"]
90+
layout_mode = 2
91+
size_flags_horizontal = 3
92+
theme = ExtResource("4_1evut")
93+
text = "0"
94+
5095
[node name="GameStatsBkgd" type="Panel" parent="."]
5196
offset_left = 75.0
52-
offset_top = 183.0
97+
offset_top = 250.0
5398
offset_right = 425.0
54-
offset_bottom = 1207.0
99+
offset_bottom = 1274.0
55100
theme_override_styles/panel = SubResource("StyleBoxFlat_k3sk6")
56101

57102
[node name="GameStats" type="VBoxContainer" parent="."]
58103
offset_left = 120.0
59-
offset_top = 205.0
104+
offset_top = 250.0
60105
offset_right = 370.0
61-
offset_bottom = 1229.0
106+
offset_bottom = 1274.0
62107
theme_override_constants/separation = 40
63108

64109
[node name="HBoxContainer1" type="HBoxContainer" parent="GameStats"]
@@ -200,37 +245,22 @@ vertical_alignment = 1
200245
[node name="BoardTextRect" type="Panel" parent="."]
201246
visible = false
202247
offset_left = 500.0
203-
offset_top = 183.0
248+
offset_top = 250.0
204249
offset_right = 1524.0
205-
offset_bottom = 1207.0
250+
offset_bottom = 1274.0
206251
theme_override_styles/panel = SubResource("StyleBoxFlat_103kv")
207252

208253
[node name="Board" parent="." instance=ExtResource("2_2ltbx")]
209-
position = Vector2(500, 183)
210-
211-
[node name="Panel" type="Panel" parent="."]
212-
visible = false
213-
anchors_preset = 8
214-
anchor_left = 0.5
215-
anchor_top = 0.5
216-
anchor_right = 0.5
217-
anchor_bottom = 0.5
218-
offset_left = 523.0
219-
offset_top = 69.0
220-
offset_right = 1046.0
221-
offset_bottom = 582.0
222-
grow_horizontal = 2
223-
grow_vertical = 2
224-
theme_override_styles/panel = SubResource("StyleBoxFlat_imdoc")
254+
position = Vector2(500, 250)
225255

226256
[node name="AudioGemMove" type="AudioStreamPlayer" parent="."]
227257
stream = ExtResource("8_7jpwb")
228258

229259
[node name="BtnNewGame" type="TextureButton" parent="."]
230-
offset_left = 1617.0
231-
offset_top = 293.0
232-
offset_right = 2776.0
233-
offset_bottom = 651.0
260+
offset_left = 1608.0
261+
offset_top = 255.0
262+
offset_right = 2767.0
263+
offset_bottom = 613.0
234264
scale = Vector2(0.3, 0.3)
235265
texture_normal = ExtResource("10_qtl06")
236266

@@ -247,10 +277,11 @@ horizontal_alignment = 1
247277
vertical_alignment = 1
248278

249279
[node name="BtnClearDebugLabels" type="TextureButton" parent="."]
250-
offset_left = 1668.0
251-
offset_top = 554.0
252-
offset_right = 2827.0
253-
offset_bottom = 912.0
280+
visible = false
281+
offset_left = 1657.0
282+
offset_top = 393.0
283+
offset_right = 2816.0
284+
offset_bottom = 751.0
254285
scale = Vector2(0.25, 0.25)
255286
texture_normal = ExtResource("11_bw3je")
256287

@@ -267,10 +298,11 @@ horizontal_alignment = 1
267298
vertical_alignment = 1
268299

269300
[node name="BtnMatchCol" type="TextureButton" parent="."]
270-
offset_left = 1667.0
271-
offset_top = 680.0
272-
offset_right = 2826.0
273-
offset_bottom = 1038.0
301+
visible = false
302+
offset_left = 1656.0
303+
offset_top = 519.0
304+
offset_right = 2815.0
305+
offset_bottom = 877.0
274306
scale = Vector2(0.25, 0.25)
275307
texture_normal = ExtResource("12_4fgvl")
276308

game_board/gem_cell.tscn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[ext_resource type="Script" path="res://game_board/GemControl.gd" id="3_sh1nc"]
66
[ext_resource type="Texture2D" uid="uid://dacjcttesccxk" path="res://assets/effects/explode-06.png" id="4_qqixd"]
77
[ext_resource type="FontFile" uid="uid://dlhwrp5jwkrll" path="res://assets/fonts/Acme-Regular.ttf" id="5_lb5dp"]
8-
[ext_resource type="Theme" uid="uid://hahh0mrfx2q1" path="res://debug_label_theme.tres" id="6_hn3w3"]
8+
[ext_resource type="Theme" uid="uid://hahh0mrfx2q1" path="res://themes/debug_label_theme.tres" id="6_hn3w3"]
99
[ext_resource type="AudioStream" uid="uid://ca0jp78fn0bi1" path="res://assets/audio/bfh1_glass_breaking_02.ogg" id="7_50xdd"]
1010
[ext_resource type="AudioStream" uid="uid://ds53xomd2ha1b" path="res://assets/audio/Abstract2.ogg" id="8_cgn1d"]
1111

project.godot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ config_version=5
1111
[application]
1212

1313
config/name="Godot Match 3"
14-
run/main_scene="res://game.tscn"
14+
run/main_scene="res://game/game.tscn"
1515
config/features=PackedStringArray("4.2", "GL Compatibility")
1616
config/icon="res://icon.svg"
1717

File renamed without changes.
File renamed without changes.

themes/game_top_label_theme.tres

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://c58sv51ac2qkl"]
2+
3+
[ext_resource type="FontFile" uid="uid://bylgyjavx5yts" path="res://assets/fonts/Quicksand-Regular.ttf" id="1_0i4hy"]
4+
5+
[resource]
6+
default_font = ExtResource("1_0i4hy")
7+
Label/colors/font_color = Color(0.945098, 0.945098, 0.945098, 1)
8+
Label/colors/font_outline_color = Color(0, 0, 0, 0.411765)
9+
Label/colors/font_shadow_color = Color(0, 0, 0, 0.411765)
10+
Label/constants/shadow_offset_x = 3
11+
Label/constants/shadow_offset_y = 3
12+
Label/font_sizes/font_size = 72

0 commit comments

Comments
 (0)