加入 Node节点类 还未测试新框架

This commit is contained in:
2025-10-27 23:12:56 +08:00
parent 80d088316b
commit 0ae47e5d6a
52 changed files with 1642 additions and 458 deletions

View File

@@ -1,31 +1,25 @@
#include "GameMapLayer.h"
#include "EngineCore/Game.h"
GameMapLayer::GameMapLayer()
{
}
GameMapLayer::~GameMapLayer()
{
}
void GameMapLayer::Render()
{
Actor::Render();
RenderManager *renderer = Game::GetInstance().GetRenderer();
// 自身坐标
float Xpos = GetIterationPos().x + GetPos().x;
float Ypos = GetIterationPos().y + GetPos().y;
for (auto &info : this->FeasibleAreaInfoList)
{
SDL_Rect buf;
buf.x = info.x + Xpos;
buf.y = info.y + Ypos;
buf.w = info.w;
buf.h = info.h;
//TODO: 渲染可行区域
}
Actor::Render();
// RenderManager *renderer = Game::GetInstance().GetRenderer();
// // 自身坐标
// float Xpos = GetIterationPos().x + GetPos().x;
// float Ypos = GetIterationPos().y + GetPos().y;
// for (auto &info : this->FeasibleAreaInfoList)
// {
// SDL_Rect buf;
// buf.x = info.x + Xpos;
// buf.y = info.y + Ypos;
// buf.w = info.w;
// buf.h = info.h;
// //TODO: 渲染可行区域
// }
}
void GameMapLayer::AddDebugFeasibleAreaInfo(Vec2 pos, VecSize size)