|
| 1 | +[gd_scene load_steps=15 format=3 uid="uid://xl674gbk881y"] |
| 2 | + |
| 3 | +[ext_resource type="Script" path="res://Games/Godotris/Game/godotris_game.gd" id="1_0mtes"] |
| 4 | +[ext_resource type="Script" path="res://Games/Godotris/Game/godotris_input_handler.gd" id="1_g8vii"] |
| 5 | +[ext_resource type="PackedScene" uid="uid://bh4wsctpxw88n" path="res://Games/Godotris/Grid/grid.tscn" id="2_1r4od"] |
| 6 | +[ext_resource type="PackedScene" uid="uid://b1xykl5fledwa" path="res://Games/Godotris/PieceHolder/piece_holder.tscn" id="3_la86e"] |
| 7 | +[ext_resource type="PackedScene" uid="uid://corveaa2iq24x" path="res://Games/Godotris/Piece/i_piece.tscn" id="5_jv2ro"] |
| 8 | +[ext_resource type="PackedScene" uid="uid://cuxy2r5ex7lxa" path="res://Games/Godotris/Piece/j_piece.tscn" id="6_tqwyl"] |
| 9 | +[ext_resource type="PackedScene" uid="uid://b7kkiimno5ae5" path="res://Games/Godotris/Piece/l_piece.tscn" id="7_iwxu5"] |
| 10 | +[ext_resource type="Script" path="res://Games/Godotris/Game/godotris_piece_spawner.gd" id="7_kptm2"] |
| 11 | +[ext_resource type="PackedScene" uid="uid://ddf8eap1k00yb" path="res://Games/Godotris/Piece/o_piece.tscn" id="8_kiqdo"] |
| 12 | +[ext_resource type="PackedScene" uid="uid://bu55cplk7o7ja" path="res://Games/Godotris/Piece/s_piece.tscn" id="9_8dy2y"] |
| 13 | +[ext_resource type="PackedScene" uid="uid://dfa5tvxkoi4ii" path="res://Games/Godotris/Piece/t_piece.tscn" id="10_4werb"] |
| 14 | +[ext_resource type="PackedScene" uid="uid://ntmchus4unn0" path="res://Games/Godotris/Piece/z_piece.tscn" id="11_1drbf"] |
| 15 | + |
| 16 | +[sub_resource type="Gradient" id="Gradient_nlwv3"] |
| 17 | +colors = PackedColorArray(0, 0.556863, 0.568627, 1, 0, 0, 0, 1) |
| 18 | + |
| 19 | +[sub_resource type="GradientTexture2D" id="GradientTexture2D_he5fk"] |
| 20 | +gradient = SubResource("Gradient_nlwv3") |
| 21 | +fill_from = Vector2(0.226496, 0.987179) |
| 22 | +fill_to = Vector2(0.722222, 0.0811966) |
| 23 | + |
| 24 | +[node name="GodotrisGame" type="Control" node_paths=PackedStringArray("start_menu", "end_menu", "countdown_timer", "countdown_label", "score_label", "level_label", "lines_label", "piece_spawner", "input_handler", "grid")] |
| 25 | +layout_mode = 3 |
| 26 | +anchors_preset = 15 |
| 27 | +anchor_right = 1.0 |
| 28 | +anchor_bottom = 1.0 |
| 29 | +grow_horizontal = 2 |
| 30 | +grow_vertical = 2 |
| 31 | +script = ExtResource("1_0mtes") |
| 32 | +start_menu = NodePath("StartMenu") |
| 33 | +end_menu = NodePath("EndMenu") |
| 34 | +countdown_timer = NodePath("StartTimer") |
| 35 | +countdown_label = NodePath("CountdownLabel") |
| 36 | +score_label = NodePath("Grid/ScoreLabel") |
| 37 | +level_label = NodePath("Grid/LevelLabel") |
| 38 | +lines_label = NodePath("Grid/LinesLabel") |
| 39 | +piece_spawner = NodePath("PieceSpawner") |
| 40 | +input_handler = NodePath("InputHandler") |
| 41 | +grid = NodePath("Grid") |
| 42 | + |
| 43 | +[node name="StartTimer" type="Timer" parent="."] |
| 44 | + |
| 45 | +[node name="Background" type="TextureRect" parent="."] |
| 46 | +layout_mode = 1 |
| 47 | +anchors_preset = 15 |
| 48 | +anchor_right = 1.0 |
| 49 | +anchor_bottom = 1.0 |
| 50 | +grow_horizontal = 2 |
| 51 | +grow_vertical = 2 |
| 52 | +texture = SubResource("GradientTexture2D_he5fk") |
| 53 | + |
| 54 | +[node name="Grid" parent="." instance=ExtResource("2_1r4od")] |
| 55 | +layout_mode = 1 |
| 56 | + |
| 57 | +[node name="PiecePreview" parent="Grid" instance=ExtResource("3_la86e")] |
| 58 | +layout_mode = 0 |
| 59 | +offset_left = 320.0 |
| 60 | +offset_right = 480.0 |
| 61 | +offset_bottom = 96.0 |
| 62 | + |
| 63 | +[node name="ControlsLabel" type="Label" parent="Grid"] |
| 64 | +layout_mode = 1 |
| 65 | +offset_left = -400.0 |
| 66 | +offset_top = 336.0 |
| 67 | +offset_right = -32.0 |
| 68 | +offset_bottom = 523.0 |
| 69 | +theme_override_colors/font_outline_color = Color(0, 0, 0, 1) |
| 70 | +theme_override_constants/outline_size = 15 |
| 71 | +theme_override_font_sizes/font_size = 25 |
| 72 | +text = "Move left: Left arrow |
| 73 | +Move right: Right arrow |
| 74 | +Soft drop: Down arrow |
| 75 | +Rotate: Up arrow |
| 76 | +Hard drop: Space" |
| 77 | +horizontal_alignment = 2 |
| 78 | +vertical_alignment = 1 |
| 79 | + |
| 80 | +[node name="LinesLabel" type="Label" parent="Grid"] |
| 81 | +layout_mode = 1 |
| 82 | +offset_left = 352.0 |
| 83 | +offset_top = 320.0 |
| 84 | +offset_right = 720.0 |
| 85 | +offset_bottom = 397.0 |
| 86 | +theme_override_colors/font_outline_color = Color(0, 0, 0, 1) |
| 87 | +theme_override_constants/outline_size = 15 |
| 88 | +theme_override_font_sizes/font_size = 40 |
| 89 | +text = "Lines cleared: 0" |
| 90 | +vertical_alignment = 1 |
| 91 | + |
| 92 | +[node name="LevelLabel" type="Label" parent="Grid"] |
| 93 | +layout_mode = 1 |
| 94 | +offset_left = 352.0 |
| 95 | +offset_top = 400.0 |
| 96 | +offset_right = 720.0 |
| 97 | +offset_bottom = 477.0 |
| 98 | +theme_override_colors/font_outline_color = Color(0, 0, 0, 1) |
| 99 | +theme_override_constants/outline_size = 15 |
| 100 | +theme_override_font_sizes/font_size = 40 |
| 101 | +text = "Level: 0" |
| 102 | +vertical_alignment = 1 |
| 103 | + |
| 104 | +[node name="ScoreLabel" type="Label" parent="Grid"] |
| 105 | +layout_mode = 1 |
| 106 | +offset_left = 352.0 |
| 107 | +offset_top = 480.0 |
| 108 | +offset_right = 720.0 |
| 109 | +offset_bottom = 557.0 |
| 110 | +theme_override_colors/font_outline_color = Color(0, 0, 0, 1) |
| 111 | +theme_override_constants/outline_size = 15 |
| 112 | +theme_override_font_sizes/font_size = 40 |
| 113 | +text = "Score: 0" |
| 114 | +vertical_alignment = 1 |
| 115 | + |
| 116 | +[node name="CountdownLabel" type="Label" parent="."] |
| 117 | +visible = false |
| 118 | +layout_mode = 1 |
| 119 | +anchors_preset = 8 |
| 120 | +anchor_left = 0.5 |
| 121 | +anchor_top = 0.5 |
| 122 | +anchor_right = 0.5 |
| 123 | +anchor_bottom = 0.5 |
| 124 | +offset_left = -21.0 |
| 125 | +offset_top = -11.5 |
| 126 | +offset_right = 21.0 |
| 127 | +offset_bottom = 11.5 |
| 128 | +grow_horizontal = 2 |
| 129 | +grow_vertical = 2 |
| 130 | +theme_override_colors/font_outline_color = Color(0, 0, 0, 1) |
| 131 | +theme_override_constants/outline_size = 15 |
| 132 | +theme_override_font_sizes/font_size = 100 |
| 133 | +text = "Start!" |
| 134 | +horizontal_alignment = 1 |
| 135 | +vertical_alignment = 1 |
| 136 | + |
| 137 | +[node name="PieceSpawner" type="Node" parent="." node_paths=PackedStringArray("previews", "grid")] |
| 138 | +script = ExtResource("7_kptm2") |
| 139 | +previews = [NodePath("../Grid/PiecePreview")] |
| 140 | +pieces = { |
| 141 | +"i": ExtResource("5_jv2ro"), |
| 142 | +"j": ExtResource("6_tqwyl"), |
| 143 | +"l": ExtResource("7_iwxu5"), |
| 144 | +"o": ExtResource("8_kiqdo"), |
| 145 | +"s": ExtResource("9_8dy2y"), |
| 146 | +"t": ExtResource("10_4werb"), |
| 147 | +"z": ExtResource("11_1drbf") |
| 148 | +} |
| 149 | +grid = NodePath("../Grid") |
| 150 | + |
| 151 | +[node name="InputHandler" type="Node" parent="." node_paths=PackedStringArray("piece_spawner", "grid")] |
| 152 | +script = ExtResource("1_g8vii") |
| 153 | +piece_spawner = NodePath("../PieceSpawner") |
| 154 | +grid = NodePath("../Grid") |
| 155 | + |
| 156 | +[node name="StartMenu" type="Control" parent="."] |
| 157 | +layout_mode = 1 |
| 158 | +anchors_preset = 15 |
| 159 | +anchor_right = 1.0 |
| 160 | +anchor_bottom = 1.0 |
| 161 | +grow_horizontal = 2 |
| 162 | +grow_vertical = 2 |
| 163 | + |
| 164 | +[node name="VBoxContainer" type="VBoxContainer" parent="StartMenu"] |
| 165 | +layout_mode = 1 |
| 166 | +anchors_preset = 15 |
| 167 | +anchor_right = 1.0 |
| 168 | +anchor_bottom = 1.0 |
| 169 | +offset_bottom = -100.0 |
| 170 | +grow_horizontal = 2 |
| 171 | +grow_vertical = 2 |
| 172 | +theme_override_constants/separation = 40 |
| 173 | +alignment = 1 |
| 174 | + |
| 175 | +[node name="Title" type="Label" parent="StartMenu/VBoxContainer"] |
| 176 | +layout_mode = 2 |
| 177 | +theme_override_colors/font_outline_color = Color(0, 0, 0, 1) |
| 178 | +theme_override_constants/outline_size = 15 |
| 179 | +theme_override_font_sizes/font_size = 100 |
| 180 | +text = "Godotris" |
| 181 | +horizontal_alignment = 1 |
| 182 | +vertical_alignment = 1 |
| 183 | + |
| 184 | +[node name="StartButton" type="Button" parent="StartMenu/VBoxContainer"] |
| 185 | +custom_minimum_size = Vector2(250, 0) |
| 186 | +layout_mode = 2 |
| 187 | +size_flags_horizontal = 4 |
| 188 | +theme_override_font_sizes/font_size = 70 |
| 189 | +text = "Start!" |
| 190 | + |
| 191 | +[node name="EndMenu" type="Control" parent="."] |
| 192 | +visible = false |
| 193 | +layout_mode = 1 |
| 194 | +anchors_preset = 15 |
| 195 | +anchor_right = 1.0 |
| 196 | +anchor_bottom = 1.0 |
| 197 | +grow_horizontal = 2 |
| 198 | +grow_vertical = 2 |
| 199 | + |
| 200 | +[node name="RestartButton" type="Button" parent="EndMenu"] |
| 201 | +custom_minimum_size = Vector2(250, 0) |
| 202 | +layout_mode = 1 |
| 203 | +anchors_preset = 8 |
| 204 | +anchor_left = 0.5 |
| 205 | +anchor_top = 0.5 |
| 206 | +anchor_right = 0.5 |
| 207 | +anchor_bottom = 0.5 |
| 208 | +offset_left = -136.5 |
| 209 | +offset_top = -53.0 |
| 210 | +offset_right = 136.5 |
| 211 | +offset_bottom = 53.0 |
| 212 | +grow_horizontal = 2 |
| 213 | +grow_vertical = 2 |
| 214 | +size_flags_horizontal = 4 |
| 215 | +theme_override_font_sizes/font_size = 70 |
| 216 | +text = "Restart" |
| 217 | + |
| 218 | +[connection signal="timeout" from="StartTimer" to="." method="on_timer_tick"] |
| 219 | +[connection signal="piece_placed" from="Grid" to="." method="on_piece_placed"] |
| 220 | +[connection signal="piece_placed" from="Grid" to="InputHandler" method="on_piece_placed"] |
| 221 | +[connection signal="cant_spawn" from="PieceSpawner" to="." method="end_game"] |
| 222 | +[connection signal="cant_spawn" from="PieceSpawner" to="InputHandler" method="stop_control"] |
| 223 | +[connection signal="piece_harddropped" from="InputHandler" to="." method="on_piece_harddropped"] |
| 224 | +[connection signal="piece_softdropped" from="InputHandler" to="." method="on_piece_softdropped"] |
| 225 | +[connection signal="pressed" from="StartMenu/VBoxContainer/StartButton" to="." method="start_game"] |
| 226 | +[connection signal="pressed" from="EndMenu/RestartButton" to="." method="start_game"] |
0 commit comments