Optimizada la carga de las animaciones de los globos. Cacheada

This commit is contained in:
2022-10-04 12:13:47 +02:00
parent ddb70c8c85
commit c3fd348a61
6 changed files with 45 additions and 51 deletions

View File

@@ -31,7 +31,7 @@ private:
public:
// Constructor
AnimatedSprite(LTexture *texture = nullptr, SDL_Renderer *renderer = nullptr, std::string file = "", std::stringstream *stream = nullptr);
AnimatedSprite(LTexture *texture = nullptr, SDL_Renderer *renderer = nullptr, std::string file = "", std::vector<std::string> *buffer = nullptr);
// Destructor
~AnimatedSprite();
@@ -70,8 +70,8 @@ public:
// Carga la animación desde un fichero
bool loadFromFile(std::string filePath);
// Carga la animación desde un stream
bool loadFromStream(std::stringstream *stream);
// Carga la animación desde un vector
bool loadFromVector(std::vector<std::string> *source);
// Establece la animacion actual
void setCurrentAnimation(std::string name = "default");