eliminat el punter al renderer de 50.000 llocs

This commit is contained in:
2024-07-28 10:45:14 +02:00
parent 7501b4936f
commit 2948684ad3
58 changed files with 492 additions and 401 deletions

View File

@@ -2,14 +2,11 @@
#include "player.h"
// Constructor
Player::Player(float x, int y, SDL_Renderer *renderer, std::vector<Texture *> texture, std::vector<std::vector<std::string> *> animations)
Player::Player(float x, int y, std::vector<Texture *> texture, std::vector<std::vector<std::string> *> animations)
{
// Copia los punteros
this->renderer = renderer;
// Reserva memoria para los objetos
playerSprite = new AnimatedSprite(texture[0], renderer, "", animations[0]);
powerSprite = new AnimatedSprite(texture[1], renderer, "", animations[1]);
playerSprite = new AnimatedSprite(texture[0], "", animations[0]);
powerSprite = new AnimatedSprite(texture[1], "", animations[1]);
powerSprite->getTexture()->setAlpha(224);
// Establece la posición inicial del jugador