change components on_render call timing
This commit is contained in:
parent
0d071ab014
commit
c1a7b7545a
@ -18,6 +18,7 @@
|
||||
#include "graphics/ui/elements/Menu.hpp"
|
||||
#include "graphics/ui/GUI.hpp"
|
||||
#include "logic/LevelController.hpp"
|
||||
#include "logic/scripting/scripting.hpp"
|
||||
#include "logic/scripting/scripting_hud.hpp"
|
||||
#include "util/stringutil.hpp"
|
||||
#include "physics/Hitbox.hpp"
|
||||
@ -182,6 +183,9 @@ void LevelScreen::draw(float delta) {
|
||||
Viewport viewport(Window::width, Window::height);
|
||||
DrawContext ctx(nullptr, viewport, batch.get());
|
||||
|
||||
if (!hud->isPause()) {
|
||||
scripting::on_entities_render(engine->getTime().getDelta());
|
||||
}
|
||||
worldRenderer->draw(
|
||||
ctx, *camera, hudVisible, hud->isPause(), delta, postProcessing.get()
|
||||
);
|
||||
|
||||
@ -556,10 +556,6 @@ void Entities::render(
|
||||
float delta,
|
||||
bool pause
|
||||
) {
|
||||
if (!pause) {
|
||||
scripting::on_entities_render(delta);
|
||||
}
|
||||
|
||||
auto view = registry.view<Transform, rigging::Skeleton>();
|
||||
for (auto [entity, transform, skeleton] : view.each()) {
|
||||
if (transform.dirty) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user