la consola ja no pausa al jugador
This commit is contained in:
@@ -55,6 +55,7 @@ void Player::update(float delta_time) {
|
||||
|
||||
// Comprueba las entradas y modifica variables
|
||||
void Player::handleInput() {
|
||||
if (ignore_input_) { return; }
|
||||
if (Input::get()->checkAction(InputAction::LEFT)) {
|
||||
wanna_go_ = Direction::LEFT;
|
||||
} else if (Input::get()->checkAction(InputAction::RIGHT)) {
|
||||
|
||||
@@ -105,6 +105,7 @@ class Player {
|
||||
//[[nodiscard]] auto isAlive() const -> bool { return is_alive_ || (Options::cheats.invincible == Options::Cheat::State::ENABLED); } // Comprueba si el jugador esta vivo
|
||||
[[nodiscard]] auto isAlive() const -> bool { return is_alive_; } // Comprueba si el jugador esta vivo
|
||||
void setPaused(bool value) { is_paused_ = value; } // Pone el jugador en modo pausa
|
||||
void setIgnoreInput(bool value) { ignore_input_ = value; } // Ignora inputs del jugador (física sigue activa)
|
||||
|
||||
#ifdef _DEBUG
|
||||
// --- Funciones de debug ---
|
||||
@@ -146,6 +147,7 @@ class Player {
|
||||
// --- Variables de juego ---
|
||||
bool is_alive_ = true; // Indica si el jugador esta vivo o no
|
||||
bool is_paused_ = false; // Indica si el jugador esta en modo pausa
|
||||
bool ignore_input_ = false; // Ignora inputs pero mantiene la física activa
|
||||
bool auto_movement_ = false; // Indica si esta siendo arrastrado por una superficie automatica
|
||||
Room::Border border_ = Room::Border::TOP; // Indica en cual de los cuatro bordes se encuentra
|
||||
int last_grounded_position_ = 0; // Ultima posición en Y en la que se estaba en contacto con el suelo (hace doble función: tracking de caída + altura inicial del salto)
|
||||
|
||||
Reference in New Issue
Block a user