i per fi ja comença a tornar tot a la normalitat

This commit is contained in:
2025-03-05 20:52:34 +01:00
parent 5a8747cc4b
commit 241732752a
25 changed files with 75 additions and 81 deletions

View File

@@ -712,12 +712,12 @@ void Player::applySpawnValues(const PlayerSpawn &spawn)
}
// Inicializa el sprite del jugador
void Player::initSprite(const std::string &texture_path, const std::string &animations_path)
void Player::initSprite(const std::string &surface_path, const std::string &animations_path)
{
auto texture = Resource::get()->getSurface(texture_path);
auto surface = Resource::get()->getSurface(surface_path);
auto animations = Resource::get()->getAnimations(animations_path);
sprite_ = std::make_shared<SAnimatedSprite>(texture, animations);
sprite_ = std::make_shared<SAnimatedSprite>(surface, animations);
sprite_->setWidth(WIDTH_);
sprite_->setHeight(HEIGHT_);
sprite_->setCurrentAnimation("walk");