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

@@ -28,16 +28,14 @@ target("Frostbite2D")
-- 复制 assets 目录到输出目录
after_build(function (target)
local assetHelper = import("build_helpers.assets")
-- 复制 assets 目录
local assets_dir = path.join(os.projectdir(), "Game/assets")
local output_dir = target:targetdir()
local target_assets_dir = path.join(output_dir, "assets")
if os.isdir(assets_dir) then
os.rm(target_assets_dir)
os.cp(assets_dir, output_dir)
print("Copy assets directory: " .. assets_dir .. " -> " .. target_assets_dir)
end
assetHelper.syncAssets(assets_dir, target_assets_dir)
-- 复制所有依赖的 DLL (Windows 平台)
if is_plat("mingw") or is_plat("windows") then