Block animation

This commit is contained in:
@clasher113
2024-01-21 15:23:03 +02:00
parent fa6eb6ae22
commit 5fb34daf52
9 changed files with 264 additions and 24 deletions
+11
View File
@@ -54,6 +54,14 @@ void Assets::store(Atlas* atlas, std::string name){
atlases[name].reset(atlas);
}
const std::vector<TextureAnimation>& Assets::getAnimations() {
return animations;
}
void Assets::store(const TextureAnimation& animation) {
animations.emplace_back(animation);
}
void Assets::extend(const Assets& assets) {
for (auto entry : assets.textures) {
textures[entry.first] = entry.second;
@@ -67,4 +75,7 @@ void Assets::extend(const Assets& assets) {
for (auto entry : assets.atlases) {
atlases[entry.first] = entry.second;
}
for (auto entry : assets.animations) {
animations.emplace_back(entry);
}
}