mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
feat: keeping assets alive during current frame (temporary solution)
This commit is contained in:
parent
ad758fd718
commit
ded0964827
4 changed files with 27 additions and 5 deletions
|
|
@ -1,6 +1,15 @@
|
|||
#include "Assets.hpp"
|
||||
|
||||
Assets::~Assets() = default;
|
||||
Assets::Assets(util::ObjectsKeeper& vault) : vault(vault) {
|
||||
}
|
||||
|
||||
Assets::~Assets() {
|
||||
for (auto& [_, map] : assets) {
|
||||
for (auto& [__, asset] : map) {
|
||||
vault.keepAlive(std::move(asset));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<TextureAnimation>& Assets::getAnimations() {
|
||||
return animations;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue