Posant make_uniques, s'ha quedat tot enmerdat per culpa d'un struct
This commit is contained in:
@@ -14,10 +14,10 @@
|
||||
Player::Player(int id, float x, int y, bool demo, SDL_Rect *playArea, std::vector<Texture *> texture, std::vector<std::vector<std::string> *> animations)
|
||||
{
|
||||
// Reserva memoria para los objetos
|
||||
playerSprite = std::unique_ptr<AnimatedSprite>(new AnimatedSprite(texture[0], "", animations[0]));
|
||||
powerSprite = std::unique_ptr<AnimatedSprite>(new AnimatedSprite(texture[1], "", animations[1]));
|
||||
playerSprite = std::make_unique<AnimatedSprite>(texture[0], "", animations[0]);
|
||||
powerSprite = std::make_unique<AnimatedSprite>(texture[1], "", animations[1]);
|
||||
powerSprite->getTexture()->setAlpha(224);
|
||||
enterName = std::unique_ptr<EnterName>(new EnterName());
|
||||
enterName = std::make_unique<EnterName>();
|
||||
|
||||
// Rectangulo con la zona de juego
|
||||
this->playArea = playArea;
|
||||
|
||||
Reference in New Issue
Block a user