ja es pot escriure en la consola
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "game/gameplay/stats.hpp" // Para Stats
|
||||
#include "game/options.hpp" // Para Options, options, Cheat, SectionState
|
||||
#include "game/scene_manager.hpp" // Para SceneManager
|
||||
#include "game/ui/console.hpp" // Para Console
|
||||
#include "game/ui/notifier.hpp" // Para Notifier, NotificationText, CHEEVO_NO...
|
||||
#include "utils/defines.hpp" // Para Tile::SIZE, PlayArea::HEIGHT, RoomBorder::BOTTOM
|
||||
#include "utils/utils.hpp" // Para PaletteColor, stringToColor
|
||||
@@ -71,7 +72,9 @@ void Game::handleEvents() {
|
||||
while (SDL_PollEvent(&event)) {
|
||||
GlobalEvents::handle(event);
|
||||
#ifdef _DEBUG
|
||||
handleDebugEvents(event);
|
||||
if (!Console::get()->isActive()) {
|
||||
handleDebugEvents(event);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -87,6 +90,12 @@ void Game::handleInput() {
|
||||
Notifier::get()->show({scoreboard_data_->music ? Locale::get()->get("game.music_enabled") : Locale::get()->get("game.music_disabled")});
|
||||
}
|
||||
|
||||
// Si la consola está activa, no procesar inputs del juego
|
||||
if (Console::get()->isActive()) {
|
||||
GlobalInputs::handle();
|
||||
return;
|
||||
}
|
||||
|
||||
// Durante fade/postfade, solo procesar inputs globales
|
||||
if (state_ != State::PLAYING) {
|
||||
GlobalInputs::handle();
|
||||
@@ -163,17 +172,19 @@ 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);
|
||||
}
|
||||
// Si estamos arrastrando, no ejecutar la física normal del jugador
|
||||
if (!debug_dragging_player_) {
|
||||
player_->update(delta_time);
|
||||
}
|
||||
#else
|
||||
player_->update(delta_time);
|
||||
player_->update(delta_time);
|
||||
#endif
|
||||
}
|
||||
checkPlayerIsOnBorder();
|
||||
checkPlayerAndItems();
|
||||
checkPlayerAndEnemies();
|
||||
|
||||
Reference in New Issue
Block a user