Commit de vesprà tirada a la brossa
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <SDL2/SDL_timer.h> // for SDL_GetTicks
|
||||
#include <stdlib.h> // for rand
|
||||
#include <algorithm> // for max, min
|
||||
#include "animated_sprite.h" // for AnimatedSprite
|
||||
#include "animated_sprite.h" // for SpriteAnimated
|
||||
#include "input.h" // for inputs_e
|
||||
#include "param.h" // for param
|
||||
#include "texture.h" // for Texture
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
// Constructor
|
||||
Player::Player(int id, float x, int y, bool demo, SDL_Rect *play_area, std::vector<std::shared_ptr<Texture>> texture, std::vector<std::vector<std::string> *> animations)
|
||||
: player_sprite_(std::make_unique<AnimatedSprite>(texture[0], "", animations[0])),
|
||||
power_sprite_(std::make_unique<AnimatedSprite>(texture[1], "", animations[1])),
|
||||
: player_sprite_(std::make_unique<AnimatedSprite>(texture[0], animations[0])),
|
||||
power_sprite_(std::make_unique<AnimatedSprite>(texture[1], animations[1])),
|
||||
enter_name_(std::make_unique<EnterName>()),
|
||||
play_area_(play_area),
|
||||
id_(id),
|
||||
@@ -279,10 +279,10 @@ void Player::setAnimation()
|
||||
}
|
||||
|
||||
// Actualiza las animaciones de los sprites
|
||||
player_sprite_->animate();
|
||||
player_sprite_->update();
|
||||
|
||||
// powerSprite->setFlip(flip_walk);
|
||||
power_sprite_->animate();
|
||||
power_sprite_->update();
|
||||
}
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
|
||||
Reference in New Issue
Block a user