This commit is contained in:
2025-01-02 15:17:14 -05:00
parent 18072f3b66
commit bd72263944
12 changed files with 72 additions and 17 deletions

View File

@@ -27,18 +27,21 @@ void Engine::Scene::Update() {
e->Update();
}
void Engine::Scene::Render() {
void Engine::Scene::Render(RenderTarget* render_target) {
for (auto& f : FixedList)
if (f->Enabled())
f->Render();
// TODO Render order. In this system it's not possible for child entities to be rendered before the parent.
J2D::Begin(render_target, true);
for (auto& e : EntityList)
if (auto* r = dynamic_cast<Renderable*>(e))
r->Render();
if (HeadsUpDisplay)
HeadsUpDisplay->Render();
J2D::End();
}
Engine::Scene::~Scene() {