Marry 乒乓球游戏:Godot 4.6 + C++ GDExtension
这个提交包含在:
@@ -0,0 +1,86 @@
|
||||
[gd_scene 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)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="rect_wall_top"]
|
||||
size = Vector2(1200.0, 10.0)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="rect_wall_bottom"]
|
||||
size = Vector2(1200.0, 10.0)
|
||||
|
||||
[node name="Game" type="PingPongGame"]
|
||||
|
||||
[node name="TopWall" type="StaticBody2D" parent="Game"]
|
||||
position = Vector2(576.0, 15.0)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Game/TopWall"]
|
||||
shape = SubResource("rect_wall_top")
|
||||
|
||||
[node name="BottomWall" type="StaticBody2D" parent="Game"]
|
||||
position = Vector2(576.0, 633.0)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Game/BottomWall"]
|
||||
shape = SubResource("rect_wall_bottom")
|
||||
|
||||
[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 = -60.0
|
||||
offset_right = 200.0
|
||||
offset_bottom = 60.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)
|
||||
在新工单中引用
屏蔽一个用户