Block animation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user