feat: 实现游戏摄像机控制器并优化地图系统

重构地图系统,增加摄像机控制器管理相机行为。主要变更包括:
- 新增 GameCameraController 类,支持跟随目标和调试模式
- 重构 GameMap 类,分离相机逻辑到控制器
- 优化地图资源加载和同步逻辑
- 改进动画系统的事件处理
- 添加地图测试场景用于快速验证
This commit is contained in:
2026-04-02 20:07:42 +08:00
parent d55808d80f
commit ec16aeffa6
27 changed files with 16891 additions and 15694 deletions

View File

@@ -15,6 +15,8 @@ public:
const Vec2& getPosition() const { return position_; }
float getZoom() const { return zoom_; }
int getViewportWidth() const { return viewportWidth_; }
int getViewportHeight() const { return viewportHeight_; }
void lookAt(const Vec2& target);
void move(const Vec2& delta);
@@ -31,4 +33,4 @@ public:
bool flipY_ = false; // 调试用Y轴翻转开关
};
}
}