Solventat bug amb el punter a ScoreboardData

This commit is contained in:
2025-02-27 14:17:00 +01:00
parent c6474cb2da
commit 0cec9f8556
20 changed files with 246 additions and 223 deletions

View File

@@ -44,13 +44,13 @@ struct PlayerSpawn
struct PlayerData
{
PlayerSpawn spawn;
std::shared_ptr< texture;
std::string animation;
std::string texture_path;
std::string animations_path;
std::shared_ptr<Room> room;
// Constructor
PlayerData(PlayerSpawn spawn, std::string png, std::string animation, std::shared_ptr<Room> room)
: spawn(spawn), texture(png), animation(animation), room(room) {}
PlayerData(PlayerSpawn spawn, std::string texture_path, std::string animations_path, std::shared_ptr<Room> room)
: spawn(spawn), texture_path(texture_path), animations_path(animations_path), room(room) {}
};
class Player
@@ -159,7 +159,12 @@ public:
void applySpawnValues(const PlayerSpawn &spawn);
// Inicializa el sprite del jugador
void initSprite(const std::string &png, const std::string &animation);
void initSprite(const std::string &texture_path, const std::string &animations_path);
#ifdef DEBUG
// Pinta la información de debug del jugador
void renderDebugInfo();
#endif
public:
// Constructor