add 新增远程连接,实现多人游戏
This commit is contained in:
60
Main.tscn
60
Main.tscn
@ -1,30 +1,50 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://boa4od72355o4"]
|
||||
|
||||
[ext_resource type="Script" path="res://Main.cs" id="1_h4cv2"]
|
||||
[ext_resource type="PackedScene" uid="uid://b1tx7v3230wab" path="res://Scenes/Chessboard.tscn" id="2_bx85x"]
|
||||
[ext_resource type="Theme" uid="uid://c53fg2fg071yp" path="res://Asserts/defalutTheme.tres" id="2_8jwne"]
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
script = ExtResource("1_h4cv2")
|
||||
|
||||
[node name="Chessboard" parent="." instance=ExtResource("2_bx85x")]
|
||||
position = Vector2(360, 660)
|
||||
scale = Vector2(2.5, 2.5)
|
||||
[node name="Control" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
theme = ExtResource("2_8jwne")
|
||||
|
||||
[node name="Undo" type="Button" parent="."]
|
||||
offset_left = 200.0
|
||||
offset_top = 50.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 150.0
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "撤回"
|
||||
[node name="SignlePlayer" type="Button" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 83.0
|
||||
offset_top = 671.0
|
||||
offset_right = 298.0
|
||||
offset_bottom = 850.0
|
||||
text = "单人"
|
||||
|
||||
[node name="ReInit" type="Button" parent="."]
|
||||
offset_left = 450.0
|
||||
offset_top = 50.0
|
||||
offset_right = 550.0
|
||||
offset_bottom = 150.0
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "重开"
|
||||
[node name="MultiPlayer" type="Button" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 406.0
|
||||
offset_top = 670.0
|
||||
offset_right = 612.0
|
||||
offset_bottom = 852.0
|
||||
text = "多人"
|
||||
|
||||
[connection signal="pressed" from="Undo" to="Chessboard" method="undo"]
|
||||
[connection signal="pressed" from="ReInit" to="Chessboard" method="redo"]
|
||||
[node name="Label" type="Label" parent="Control"]
|
||||
layout_mode = 0
|
||||
offset_left = 210.0
|
||||
offset_top = 312.0
|
||||
offset_right = 520.0
|
||||
offset_bottom = 498.0
|
||||
text = "中国象棋"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Setting" type="Button" parent="Control"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = 249.0
|
||||
offset_top = 1034.0
|
||||
offset_right = 432.0
|
||||
offset_bottom = 1201.0
|
||||
text = "设置"
|
||||
|
||||
[connection signal="pressed" from="Control/SignlePlayer" to="." method="GoToSignlePlayer"]
|
||||
[connection signal="pressed" from="Control/MultiPlayer" to="." method="GoToMultiPlayer"]
|
||||
|
Reference in New Issue
Block a user