feat: 重构多人游戏界面和代码,使用文件存储游戏配置,重构底层代码
This commit is contained in:
@ -8,50 +8,68 @@
|
||||
script = ExtResource("1_3x8ac")
|
||||
|
||||
[node name="Chessboard" parent="." instance=ExtResource("1_yheur")]
|
||||
position = Vector2(360, 660)
|
||||
position = Vector2(360, 600)
|
||||
scale = Vector2(2.5, 2.5)
|
||||
|
||||
[node name="Control" type="Control" parent="."]
|
||||
custom_minimum_size = Vector2(720, 1280)
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
offset_right = 720.0
|
||||
offset_bottom = 1280.0
|
||||
theme = ExtResource("3_rcfhx")
|
||||
|
||||
[node name="Over" type="Button" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 270.0
|
||||
offset_top = 1105.0
|
||||
offset_right = 449.0
|
||||
offset_bottom = 1209.0
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Control"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 81.0
|
||||
grow_horizontal = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Control/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Control/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Home" type="Button" parent="Control/MarginContainer/HBoxContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
text = "返回主页"
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="Control/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Undo" type="Button" parent="Control/MarginContainer/HBoxContainer/MarginContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
text = "撤回"
|
||||
|
||||
[node name="MarginContainer3" type="MarginContainer" parent="Control/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="ReInit" type="Button" parent="Control/MarginContainer/HBoxContainer/MarginContainer3"]
|
||||
layout_mode = 2
|
||||
text = "重开"
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="Control"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -114.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="Over" type="Button" parent="Control/MarginContainer2"]
|
||||
layout_mode = 2
|
||||
text = "结束回合
|
||||
(提示对方结束)"
|
||||
|
||||
[node name="Home" type="Button" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 55.0
|
||||
offset_top = 56.0
|
||||
offset_right = 157.0
|
||||
offset_bottom = 164.0
|
||||
text = "返回主页"
|
||||
|
||||
[node name="Undo" type="Button" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 319.0
|
||||
offset_top = 58.0
|
||||
offset_right = 419.0
|
||||
offset_bottom = 158.0
|
||||
text = "撤回"
|
||||
|
||||
[node name="ReInit" type="Button" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 578.0
|
||||
offset_top = 55.0
|
||||
offset_right = 678.0
|
||||
offset_bottom = 155.0
|
||||
text = "重开"
|
||||
|
||||
[connection signal="pressed" from="Control/Over" to="." method="BtnOver"]
|
||||
[connection signal="pressed" from="Control/Home" to="." method="GoHome"]
|
||||
[connection signal="pressed" from="Control/Undo" to="." method="Undo"]
|
||||
[connection signal="pressed" from="Control/ReInit" to="." method="ReInit"]
|
||||
[connection signal="pressed" from="Control/MarginContainer/HBoxContainer/MarginContainer/Home" to="." method="GoHome"]
|
||||
[connection signal="pressed" from="Control/MarginContainer/HBoxContainer/MarginContainer2/Undo" to="." method="Undo"]
|
||||
[connection signal="pressed" from="Control/MarginContainer/HBoxContainer/MarginContainer3/ReInit" to="." method="ReInit"]
|
||||
[connection signal="pressed" from="Control/MarginContainer2/Over" to="." method="BtnOver"]
|
||||
|
Reference in New Issue
Block a user