feat(场景管理): 添加UIScene支持并重构场景管理器
refactor(渲染器): 优化相机切换时的渲染批处理 feat(调试工具): 新增游戏调试UI场景和九宫格面板组件 fix(动画系统): 跳过缺失的动画资源加载并记录日志 perf(资源加载): 使用BinaryFileStreamReader优化NPK文件解析 feat(地图系统): 支持多边形可行走区域调试显示 style(代码格式): 清理多余空格和统一文件编码 docs(注释): 补充关键类和方法的文档说明 test(启动跟踪): 添加启动过程性能跟踪工具 chore(依赖): 添加SDL2_ttf库支持
This commit is contained in:
22
Game/include/scene/GameDebugUIScene.h
Normal file
22
Game/include/scene/GameDebugUIScene.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <frostbite2D/scene/ui_scene.h>
|
||||
|
||||
namespace frostbite2D {
|
||||
|
||||
class CharacterObject;
|
||||
class GameMap;
|
||||
|
||||
class GameDebugUIScene : public UIScene {
|
||||
public:
|
||||
GameDebugUIScene() = default;
|
||||
~GameDebugUIScene() override = default;
|
||||
|
||||
void onEnter() override;
|
||||
void onExit() override;
|
||||
|
||||
void SetDebugContext(GameMap* map, CharacterObject* character);
|
||||
void ClearDebugContext();
|
||||
};
|
||||
|
||||
} // namespace frostbite2D
|
||||
@@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "camera/GameCameraController.h"
|
||||
#include "character/CharacterObject.h"
|
||||
#include "map/GameMap.h"
|
||||
#include "scene/GameDebugUIScene.h"
|
||||
#include <frostbite2D/scene/scene.h>
|
||||
|
||||
namespace frostbite2D {
|
||||
@@ -19,6 +20,7 @@ public:
|
||||
private:
|
||||
GameCameraController cameraController_;
|
||||
RefPtr<CharacterObject> character_;
|
||||
RefPtr<GameDebugUIScene> debugScene_;
|
||||
bool initialized_ = false;
|
||||
RefPtr<GameMap> map_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user