feat(地图系统): 增强移动区域调试功能
- 添加移动区域边界结构体MoveAreaBounds并集成到地图配置中 - 实现移动区域索引查找和高亮显示功能 - 增加可移动区域检查开关movableAreaCheckEnabled - 优化调试信息显示,包括坐标和当前所在移动区域 - 重构移动区域相关代码,提高可维护性
This commit is contained in:
@@ -41,6 +41,11 @@ struct MoveAreaTarget {
|
||||
int area = -2;
|
||||
};
|
||||
|
||||
struct MoveAreaBounds {
|
||||
Vec2 leftTop = Vec2::Zero();
|
||||
Vec2 rightBottom = Vec2::Zero();
|
||||
};
|
||||
|
||||
struct TileInfo {
|
||||
std::string spritePath;
|
||||
int spriteIndex = 0;
|
||||
@@ -65,6 +70,7 @@ struct MapConfig {
|
||||
std::vector<std::string> soundIds;
|
||||
std::vector<Vec2> virtualMovablePolygon;
|
||||
std::vector<Rect> townMovableAreas;
|
||||
std::vector<MoveAreaBounds> townMovableAreaBounds;
|
||||
std::vector<MoveAreaTarget> townMovableAreaTargets;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user