添加小游戏面板

This commit is contained in:
2025-08-28 10:23:13 +08:00
parent 633c1cac44
commit ca5685df52
24 changed files with 4569 additions and 1250 deletions

View File

@@ -26,11 +26,11 @@ layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 20.0
offset_top = -50.0
offset_right = 200.0
offset_bottom = -20.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="."]
@@ -55,3 +55,120 @@ 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"]