lua: hud library

This commit is contained in:
MihailRis
2024-02-16 13:57:03 +03:00
parent ffed4319da
commit 7e553efdec
14 changed files with 140 additions and 31 deletions
+3 -1
View File
@@ -21,6 +21,7 @@
#include "../objects/Player.h"
#include "../logic/ChunksController.h"
#include "../logic/LevelController.h"
#include "../logic/scripting/scripting_frontend.h"
#include "../voxels/Chunks.h"
#include "../voxels/Chunk.h"
#include "../engine.h"
@@ -87,7 +88,7 @@ LevelScreen::LevelScreen(Engine* engine, Level* level)
: Screen(engine),
level(level),
frontend(std::make_unique<LevelFrontend>(level, engine->getAssets())),
hud(std::make_unique<HudRenderer>(engine, frontend.get())),
hud(std::make_unique<Hud>(engine, frontend.get())),
worldRenderer(std::make_unique<WorldRenderer>(engine, frontend.get())),
controller(std::make_unique<LevelController>(engine->getSettings(), level)) {
@@ -96,6 +97,7 @@ LevelScreen::LevelScreen(Engine* engine, Level* level)
animator.reset(new TextureAnimator());
animator->addAnimations(engine->getAssets()->getAnimations());
scripting::on_frontend_init(hud.get());
}
LevelScreen::~LevelScreen() {