forked from jaildesigner-jailgames/jaildoctors_dilemma
[DOC:29/10/2025] la surface ara se pillarà del .ANI
Tots els arxius .ani i .room retocats per a adequarse als canvis.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
Player::Player(const Data& player)
|
||||
: room_(player.room) {
|
||||
// Inicializa algunas variables
|
||||
initSprite(player.texture_path, player.animations_path);
|
||||
initSprite(/*player.texture_path, */player.animations_path);
|
||||
setColor();
|
||||
applySpawnValues(player.spawn_data);
|
||||
placeSprite();
|
||||
@@ -641,11 +641,11 @@ void Player::applySpawnValues(const SpawnData& spawn) {
|
||||
}
|
||||
|
||||
// Inicializa el sprite del jugador
|
||||
void Player::initSprite(const std::string& surface_path, const std::string& animations_path) {
|
||||
auto surface = Resource::get()->getSurface(surface_path);
|
||||
void Player::initSprite(/*const std::string& surface_path, */const std::string& animations_path) {
|
||||
//auto surface = Resource::get()->getSurface(surface_path);
|
||||
auto animations = Resource::get()->getAnimations(animations_path);
|
||||
|
||||
sprite_ = std::make_shared<SurfaceAnimatedSprite>(surface, animations);
|
||||
sprite_ = std::make_shared<SurfaceAnimatedSprite>(/*surface, */animations);
|
||||
sprite_->setWidth(WIDTH);
|
||||
sprite_->setHeight(HEIGHT);
|
||||
sprite_->setCurrentAnimation("walk");
|
||||
|
||||
Reference in New Issue
Block a user