chinese_chess/Scenes/ChessGame.tscn
ZZY 7e2ca3948d feat: 重构棋盘逻辑和游戏流程,将引擎版本提升至4.3
- 重构了 VirtualBoard 类,优化了棋盘操作和事件处理
- 重写了 ChessPiece 类,增加了事件处理和虚拟棋子逻辑
- 更新了 ChessGame 控制器,增加了结束回合功能和对话框
- 调整了场景布局和资源引用
- 清理了冗余代码和注释
2024-11-02 21:18:53 +08:00

58 lines
1.7 KiB
Plaintext

[gd_scene load_steps=4 format=3 uid="uid://g40y10iaf7qb"]
[ext_resource type="Script" path="res://Scripts/Controllers/ChessGame.cs" id="1_3x8ac"]
[ext_resource type="PackedScene" uid="uid://b1tx7v3230wab" path="res://Scenes/Entities/Chessboard.tscn" id="1_yheur"]
[ext_resource type="Theme" uid="uid://intlbeu8h82r" path="res://Asserts/defaultTheme.tres" id="3_rcfhx"]
[node name="ChessGame" type="Node2D"]
script = ExtResource("1_3x8ac")
[node name="Chessboard" parent="." instance=ExtResource("1_yheur")]
position = Vector2(360, 660)
scale = Vector2(2.5, 2.5)
[node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.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
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"]