la consola ja no pausa al jugador
This commit is contained in:
@@ -65,6 +65,7 @@ Game::Game(Mode mode)
|
||||
Cheevos::get()->clearUnobtainableState();
|
||||
|
||||
GameControl::refresh_player_color = [this]() -> void { player_->setColor(); };
|
||||
Console::get()->on_toggle = [this](bool open) { player_->setIgnoreInput(open); };
|
||||
GameControl::change_player_skin = [this](int skin_num) -> void {
|
||||
Options::game.player_skin = skin_num;
|
||||
player_->setSkin(skin_num);
|
||||
@@ -116,6 +117,7 @@ Game::~Game() {
|
||||
|
||||
GameControl::refresh_player_color = nullptr;
|
||||
GameControl::change_player_skin = nullptr;
|
||||
Console::get()->on_toggle = nullptr;
|
||||
|
||||
#ifdef _DEBUG
|
||||
GameControl::change_room = nullptr;
|
||||
@@ -229,19 +231,17 @@ void Game::updatePlaying(float delta_time) {
|
||||
room_->update(delta_time);
|
||||
switch (mode_) {
|
||||
case Mode::GAME:
|
||||
if (!Console::get()->isActive()) {
|
||||
#ifdef _DEBUG
|
||||
// Maneja el arrastre del jugador con el ratón (debug)
|
||||
handleDebugMouseDrag(delta_time);
|
||||
// Maneja el arrastre del jugador con el ratón (debug)
|
||||
handleDebugMouseDrag(delta_time);
|
||||
|
||||
// Si estamos arrastrando, no ejecutar la física normal del jugador
|
||||
if (!debug_dragging_player_) {
|
||||
player_->update(delta_time);
|
||||
}
|
||||
#else
|
||||
// Si estamos arrastrando, no ejecutar la física normal del jugador
|
||||
if (!debug_dragging_player_) {
|
||||
player_->update(delta_time);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
player_->update(delta_time);
|
||||
#endif
|
||||
checkPlayerIsOnBorder();
|
||||
checkPlayerAndItems();
|
||||
checkPlayerAndEnemies();
|
||||
|
||||
Reference in New Issue
Block a user