mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 15:01:49 +00:00
Block animation
This commit is contained in:
parent
fa6eb6ae22
commit
5fb34daf52
9 changed files with 264 additions and 24 deletions
|
|
@ -1,9 +1,12 @@
|
|||
#ifndef ASSETS_ASSETS_H_
|
||||
#define ASSETS_ASSETS_H_
|
||||
|
||||
#include "../graphics/TextureAnimation.h"
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
class Texture;
|
||||
class Shader;
|
||||
|
|
@ -15,6 +18,7 @@ class Assets {
|
|||
std::unordered_map<std::string, std::shared_ptr<Shader>> shaders;
|
||||
std::unordered_map<std::string, std::shared_ptr<Font>> fonts;
|
||||
std::unordered_map<std::string, std::shared_ptr<Atlas>> atlases;
|
||||
std::vector<TextureAnimation> animations;
|
||||
public:
|
||||
~Assets();
|
||||
Texture* getTexture(std::string name) const;
|
||||
|
|
@ -29,6 +33,9 @@ public:
|
|||
Atlas* getAtlas(std::string name) const;
|
||||
void store(Atlas* atlas, std::string name);
|
||||
|
||||
const std::vector<TextureAnimation>& getAnimations();
|
||||
void store(const TextureAnimation& animation);
|
||||
|
||||
void extend(const Assets& assets);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue