canvi d'skin en la consola
This commit is contained in:
@@ -65,6 +65,10 @@ Game::Game(Mode mode)
|
||||
Cheevos::get()->clearUnobtainableState();
|
||||
|
||||
GameControl::refresh_player_color = [this]() -> void { player_->setColor(); };
|
||||
GameControl::change_player_skin = [this](int skin_num) -> void {
|
||||
Options::game.player_skin = skin_num;
|
||||
player_->setSkin(skin_num);
|
||||
};
|
||||
|
||||
#ifdef _DEBUG
|
||||
GameControl::change_room = [this](const std::string& r) -> bool { return this->changeRoom(r); };
|
||||
@@ -110,6 +114,7 @@ Game::~Game() {
|
||||
ItemTracker::destroy();
|
||||
|
||||
GameControl::refresh_player_color = nullptr;
|
||||
GameControl::change_player_skin = nullptr;
|
||||
|
||||
#ifdef _DEBUG
|
||||
GameControl::change_room = nullptr;
|
||||
@@ -875,7 +880,7 @@ void Game::checkEndGameCheevos() { // NOLINT(readability-convert-member-functio
|
||||
|
||||
// Inicializa al jugador
|
||||
void Game::initPlayer(const Player::SpawnData& spawn_point, std::shared_ptr<Room> room) { // NOLINT(readability-convert-member-functions-to-static)
|
||||
std::string player_animations = Options::cheats.alternate_skin == Options::Cheat::State::ENABLED ? "player2.yaml" : "player.yaml";
|
||||
std::string player_animations = (Options::game.player_skin == 2) ? "player2.yaml" : "player.yaml";
|
||||
const Player::Data PLAYER{.spawn_data = spawn_point, .animations_path = player_animations, .room = std::move(room)};
|
||||
player_ = std::make_shared<Player>(PLAYER);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user