Revisada la carrega de recursos en game.cpp
This commit is contained in:
@@ -8,9 +8,13 @@ class Texture;
|
||||
|
||||
struct ExplosionTexture
|
||||
{
|
||||
std::shared_ptr<Texture> texture; // Textura para la explosión
|
||||
std::vector<std::string> *animation; // Animación para la textura
|
||||
int size; // Tamaño de la explosión
|
||||
int size; // Tamaño de la explosión
|
||||
std::shared_ptr<Texture> texture; // Textura para la explosión
|
||||
std::vector<std::string> animation; // Animación para la textura
|
||||
|
||||
// Constructor
|
||||
ExplosionTexture(int sz, std::shared_ptr<Texture> tex, std::vector<std::string> anim)
|
||||
: size(sz), texture(tex), animation(anim) {}
|
||||
};
|
||||
|
||||
// Clase explosions
|
||||
@@ -41,7 +45,7 @@ public:
|
||||
void render();
|
||||
|
||||
// Añade texturas al objeto
|
||||
void addTexture(int size, std::shared_ptr<Texture> texture, std::vector<std::string> *animation);
|
||||
void addTexture(int size, std::shared_ptr<Texture> texture, std::vector<std::string> &animation);
|
||||
|
||||
// Añade una explosión
|
||||
void add(int x, int y, int size);
|
||||
|
||||
Reference in New Issue
Block a user