ZZY 9c619784af feat(重构): 重构棋盘和棋子的逻辑
- 重构了 ChessBoard 和 ChessPiece 类的逻辑
- 添加了新版本的 ChineseChess 库
- 删除了旧版本的 VirtualBoard 和 VirtualPiece 类
- 更新了相关的场景和脚本
2024-11-22 20:01:40 +08:00

19 lines
479 B
C#

using System;
using System.Collections.Generic;
using Vector2I = Vector.Vector2I;
public interface IPiece {
Vector2I Pos { get; set; }
string Name { get; set; }
bool IsSelected { get; set; }
Dictionary<string, object> Data { get; set; }
event EventHandler<Vector2I> OnPos;
event EventHandler<Vector2I> OnMove;
event EventHandler<bool> OnSelected;
event EventHandler<string> OnName;
bool CanMove(Vector2I to);
bool Move(Vector2I pos);
}