feat: 重构棋盘逻辑和游戏流程,将引擎版本提升至4.3
- 重构了 VirtualBoard 类,优化了棋盘操作和事件处理 - 重写了 ChessPiece 类,增加了事件处理和虚拟棋子逻辑 - 更新了 ChessGame 控制器,增加了结束回合功能和对话框 - 调整了场景布局和资源引用 - 清理了冗余代码和注释
This commit is contained in:
22
Main.tscn
22
Main.tscn
@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://boa4od72355o4"]
|
||||
|
||||
[ext_resource type="Script" path="res://Main.cs" id="1_h4cv2"]
|
||||
[ext_resource type="Theme" uid="uid://c53fg2fg071yp" path="res://Asserts/defalutTheme.tres" id="2_8jwne"]
|
||||
[ext_resource type="Theme" uid="uid://intlbeu8h82r" path="res://Asserts/defaultTheme.tres" id="2_afihr"]
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
script = ExtResource("1_h4cv2")
|
||||
@ -9,7 +9,7 @@ script = ExtResource("1_h4cv2")
|
||||
[node name="Control" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
theme = ExtResource("2_8jwne")
|
||||
theme = ExtResource("2_afihr")
|
||||
|
||||
[node name="SignlePlayer" type="Button" parent="Control"]
|
||||
layout_mode = 0
|
||||
@ -29,21 +29,21 @@ text = "多人"
|
||||
|
||||
[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
|
||||
offset_left = 191.0
|
||||
offset_top = 265.0
|
||||
offset_right = 501.0
|
||||
offset_bottom = 451.0
|
||||
theme_override_font_sizes/font_size = 48
|
||||
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
|
||||
offset_left = 239.0
|
||||
offset_top = 967.0
|
||||
offset_right = 450.0
|
||||
offset_bottom = 1150.0
|
||||
text = "设置"
|
||||
|
||||
[connection signal="pressed" from="Control/SignlePlayer" to="." method="GoToSignlePlayer"]
|
||||
|
Reference in New Issue
Block a user