[gd_scene load_steps=2 format=3 uid="uid://grpkpy4duwac"] [ext_resource type="Script" uid="uid://rut5cdp1l3nh" path="res://Scene/SmallGame/SnakeGame.gd" id="1_o070e"] [node name="SnakeGame" type="Panel"] offset_right = 1403.0 offset_bottom = 726.0 script = ExtResource("1_o070e") [node name="GameArea" type="Panel" parent="."] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 offset_left = -300.0 offset_top = -300.0 offset_right = 300.0 offset_bottom = 300.0 grow_horizontal = 2 grow_vertical = 2 [node name="ScoreLabel" type="Label" parent="."] layout_mode = 1 anchors_preset = 2 anchor_top = 1.0 anchor_bottom = 1.0 offset_top = -726.0 offset_right = 180.0 offset_bottom = -684.0 grow_vertical = 0 theme_override_font_sizes/font_size = 30 text = "分数: 0" [node name="GameOverLabel" type="Label" parent="."] visible = false layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 offset_left = -100.0 offset_top = -50.0 offset_right = 100.0 offset_bottom = 50.0 grow_horizontal = 2 grow_vertical = 2 text = "游戏结束 按空格重新开始" horizontal_alignment = 1 vertical_alignment = 1 [node name="GameTimer" type="Timer" parent="."] wait_time = 0.2 autostart = true [node name="VirtualControls" type="Control" parent="."] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 offset_top = 160.0 offset_bottom = 160.0 grow_horizontal = 2 grow_vertical = 2 [node name="UpButton" type="Button" parent="VirtualControls"] custom_minimum_size = Vector2(80, 80) layout_mode = 1 anchors_preset = 5 anchor_left = 0.5 anchor_right = 0.5 offset_left = -529.5 offset_top = 114.0 offset_right = -449.5 offset_bottom = 194.0 grow_horizontal = 2 theme_override_font_sizes/font_size = 35 text = "W" [node name="TestButton" type="Button" parent="VirtualControls"] custom_minimum_size = Vector2(80, 80) layout_mode = 1 anchors_preset = 5 anchor_left = 0.5 anchor_right = 0.5 offset_left = -529.5 offset_top = 194.0 offset_right = -449.5 offset_bottom = 274.0 grow_horizontal = 2 theme_override_font_sizes/font_size = 35 disabled = true [node name="DownButton" type="Button" parent="VirtualControls"] custom_minimum_size = Vector2(80, 80) layout_mode = 1 anchors_preset = 5 anchor_left = 0.5 anchor_right = 0.5 offset_left = -529.5 offset_top = 274.0 offset_right = -449.5 offset_bottom = 354.0 grow_horizontal = 2 theme_override_font_sizes/font_size = 35 text = "S" [node name="LeftButton" type="Button" parent="VirtualControls"] custom_minimum_size = Vector2(80, 80) layout_mode = 1 anchors_preset = 4 anchor_top = 0.5 anchor_bottom = 0.5 offset_left = 94.0 offset_top = -169.0 offset_right = 174.0 offset_bottom = -89.0 grow_vertical = 2 theme_override_font_sizes/font_size = 35 text = "A" [node name="RightButton" type="Button" parent="VirtualControls"] custom_minimum_size = Vector2(80, 80) layout_mode = 1 anchors_preset = 6 anchor_left = 1.0 anchor_top = 0.5 anchor_right = 1.0 anchor_bottom = 0.5 offset_left = -1151.0 offset_top = -169.0 offset_right = -1071.0 offset_bottom = -89.0 grow_horizontal = 0 grow_vertical = 2 theme_override_font_sizes/font_size = 35 text = "D" [node name="RestartButton" type="Button" parent="VirtualControls"] custom_minimum_size = Vector2(80, 80) layout_mode = 1 anchors_preset = 3 anchor_left = 1.0 anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 offset_left = -1291.0 offset_top = -276.0 offset_right = -1086.0 offset_bottom = -196.0 grow_horizontal = 0 grow_vertical = 0 theme_override_font_sizes/font_size = 35 text = "🔄 重新开始" [node name="QuitButton" type="Button" parent="."] self_modulate = Color(1, 0.247059, 0, 1) layout_mode = 1 anchors_preset = 1 anchor_left = 1.0 anchor_right = 1.0 offset_left = -137.0 offset_top = -1.52588e-05 offset_right = -54.0 offset_bottom = 57.0 grow_horizontal = 0 scale = Vector2(1.54345, 1.50915) theme_override_font_sizes/font_size = 25 text = "关闭" [connection signal="pressed" from="QuitButton" to="." method="_on_quit_button_pressed"]