Initial: playable 3-level Breakout with menus, audio, and power-ups

This commit is contained in:
2026-08-12 17:27:11 +08:00
commit 319e75447a
45 changed files with 1594 additions and 0 deletions
View File
+36
View File
@@ -0,0 +1,36 @@
[gd_scene load_steps=2 format=3 uid="uid://b0hud000001"]
[ext_resource type="Script" path="res://scripts/ui/hud.gd" id="1_hud"]
[node name="HUD" type="CanvasLayer"]
script = ExtResource("1_hud")
[node name="ScoreLabel" type="Label" parent="."]
offset_left = 20.0
offset_top = 20.0
offset_right = 300.0
offset_bottom = 60.0
text = "Score: 0"
[node name="LivesLabel" type="Label" parent="."]
offset_left = 1000.0
offset_top = 20.0
offset_right = 1260.0
offset_bottom = 60.0
text = "Lives: 3"
horizontal_alignment = 2
[node name="LivesContainer" type="HBoxContainer" parent="."]
offset_left = 900.0
offset_top = 60.0
offset_right = 1260.0
offset_bottom = 80.0
alignment = 2
[node name="MessageLabel" type="Label" parent="."]
offset_left = 0.0
offset_top = 340.0
offset_right = 1280.0
offset_bottom = 380.0
text = "按 空格 发球"
horizontal_alignment = 1
+68
View File
@@ -0,0 +1,68 @@
[gd_scene load_steps=2 format=3 uid="uid://b0mainmenu1"]
[ext_resource type="Script" path="res://scripts/ui/main_menu.gd" id="1_menu"]
[node name="MainMenu" 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_menu")
[node name="Panel" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
color = Color(0.08, 0.1, 0.14, 1)
[node name="Title" type="Label" parent="."]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_top = 180.0
offset_bottom = 280.0
text = "MY BRICKS"
horizontal_alignment = 1
vertical_alignment = 1
[node name="StartButton" type="Button" 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 = -100.0
offset_top = -40.0
offset_right = 100.0
offset_bottom = 0.0
text = "开始游戏"
[node name="QuitButton" type="Button" 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 = -100.0
offset_top = 20.0
offset_right = 100.0
offset_bottom = 60.0
text = "退出"
[node name="Hint" type="Label" parent="."]
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -40.0
text = "空格 = 发球 / 鼠标移动挡板"
horizontal_alignment = 1
[connection signal="pressed" from="StartButton" to="." method="_on_start_pressed"]
[connection signal="pressed" from="QuitButton" to="." method="_on_quit_pressed"]