mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
Block animation
This commit is contained in:
parent
fa6eb6ae22
commit
5fb34daf52
9 changed files with 264 additions and 24 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include "../graphics/Shader.h"
|
||||
#include "../graphics/Batch2D.h"
|
||||
#include "../graphics/GfxContext.h"
|
||||
#include "../graphics/TextureAnimation.h"
|
||||
#include "../assets/Assets.h"
|
||||
#include "../world/Level.h"
|
||||
#include "../world/World.h"
|
||||
|
|
@ -92,6 +93,9 @@ LevelScreen::LevelScreen(Engine* engine, Level* level)
|
|||
|
||||
auto& settings = engine->getSettings();
|
||||
backlight = settings.graphics.backlight;
|
||||
|
||||
animator.reset(new TextureAnimator());
|
||||
animator->addAnimations(engine->getAssets()->getAnimations());
|
||||
}
|
||||
|
||||
LevelScreen::~LevelScreen() {
|
||||
|
|
@ -136,6 +140,7 @@ void LevelScreen::update(float delta) {
|
|||
|
||||
if (!hud->isPause()) {
|
||||
level->world->updateTimers(delta);
|
||||
animator->update(delta);
|
||||
}
|
||||
controller->update(delta, !inputLocked, hud->isPause());
|
||||
hud->update(hudVisible);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue