Ya precarga todos los recursos del juego

This commit is contained in:
2022-10-05 20:48:55 +02:00
parent 83a34d61bf
commit 02312e1342
8 changed files with 94 additions and 206 deletions

View File

@@ -50,15 +50,11 @@ class Player
{
private:
// Objetos
SDL_Renderer *renderer; // El renderizador de la ventana
Asset *asset; // Objeto que gestiona todos los ficheros de recursos
LTexture *headTexture; // Textura para la cabeza del jugador
LTexture *bodyTexture; // Textura para el cuerpo del jugador
LTexture *deathTexture; // Textura para la animación de muerte del jugador
LTexture *legsTexture; // Textura para las piernas del jugador
AnimatedSprite *legsSprite; // Sprite para dibujar las piernas
AnimatedSprite *bodySprite; // Sprite para dibujar el cuerpo
AnimatedSprite *headSprite; // Sprite para dibujar la cabeza
SDL_Renderer *renderer; // El renderizador de la ventana
AnimatedSprite *headSprite; // Sprite para dibujar la cabeza
AnimatedSprite *bodySprite; // Sprite para dibujar el cuerpo
AnimatedSprite *legsSprite; // Sprite para dibujar las piernas
AnimatedSprite *deathSprite; // Sprite para dibujar el jugador derrotado
// Variables
float posX; // Posicion en el eje X
@@ -106,7 +102,7 @@ public:
Uint16 powerUpCounter; // Temporizador para el modo PowerUp
// Constructor
Player(float x, int y, SDL_Renderer *renderer, std::vector<LTexture *> texture, std::vector<std::vector<std::string>*> *animations);
Player(float x, int y, SDL_Renderer *renderer, std::vector<LTexture *> texture, std::vector<std::vector<std::string> *> animations);
// Destructor
~Player();