文件
Marry/main/scenes/main.tscn
T
2026-08-05 16:28:04 +08:00

69 行
1.9 KiB
Plaintext

[gd_scene load_steps=4 format=3]
[sub_resource type="CircleShape2D" id="circle_ball"]
radius = 10.0
[sub_resource type="RectangleShape2D" id="rect_paddle"]
size = Vector2(18.0, 100.0)
[node name="Game" type="PingPongGame"]
[node name="Ball" type="PingPongBall" parent="Game"]
position = Vector2(576.0, 324.0)
initial_speed = 350.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="Game/Ball"]
shape = SubResource("circle_ball")
[node name="LeftPaddle" type="PingPongPaddle" parent="Game"]
position = Vector2(50.0, 324.0)
is_player = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Game/LeftPaddle"]
shape = SubResource("rect_paddle")
[node name="RightPaddle" type="PingPongPaddle" parent="Game"]
position = Vector2(1102.0, 324.0)
is_player = false
ball_path = NodePath("../Ball")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Game/RightPaddle"]
shape = SubResource("rect_paddle")
[node name="UI" type="CanvasLayer" parent="Game"]
[node name="LeftScore" type="Label" parent="Game/UI"]
offset_left = 200.0
offset_top = 20.0
offset_right = 400.0
offset_bottom = 70.0
text = "0"
horizontal_alignment = 1
theme_override_font_sizes/font_size = 48
theme_override_colors/font_color = Color(1.0, 1.0, 1.0, 1.0)
[node name="RightScore" type="Label" parent="Game/UI"]
offset_left = 752.0
offset_top = 20.0
offset_right = 952.0
offset_bottom = 70.0
text = "0"
horizontal_alignment = 1
theme_override_font_sizes/font_size = 48
theme_override_colors/font_color = Color(1.0, 1.0, 1.0, 1.0)
[node name="Message" type="Label" parent="Game/UI"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -200.0
offset_top = -100.0
offset_right = 200.0
offset_bottom = 100.0
text = "按空格键开始"
horizontal_alignment = 1
vertical_alignment = 1
theme_override_font_sizes/font_size = 36
theme_override_colors/font_color = Color(1.0, 1.0, 1.0, 0.9)