style: en els update() de game/scenes

This commit is contained in:
2025-11-01 22:52:56 +01:00
parent f91748bdf0
commit d46e2295ff
8 changed files with 16 additions and 20 deletions

View File

@@ -155,7 +155,6 @@ void Credits::fillTexture() {
// Actualiza las variables
void Credits::update() {
// Obtiene el delta time
const float DELTA_TIME = delta_timer_->tick();
total_time_ += DELTA_TIME; // Actualiza el tiempo total

View File

@@ -46,7 +46,6 @@ Ending::Ending()
// Actualiza el objeto
void Ending::update() {
// Obtiene el delta time
const float DELTA_TIME = delta_timer_->tick();
total_time_ += DELTA_TIME; // Actualiza el tiempo total

View File

@@ -54,7 +54,6 @@ Ending2::Ending2()
// Actualiza el objeto
void Ending2::update() {
// Obtiene el delta time
const float DELTA_TIME = delta_timer_->tick();
handleEvents(); // Comprueba los eventos

View File

@@ -116,7 +116,6 @@ void Game::run() {
// Actualiza el juego, las variables, comprueba la entrada, etc.
void Game::update() {
// Calcula el delta time
const float DELTA_TIME = delta_timer_.tick();
handleEvents(); // Comprueba los eventos
@@ -128,7 +127,8 @@ void Game::update() {
// Actualiza los objetos
room_->update(DELTA_TIME);
if (mode_ == Mode::GAME) {
switch (mode_) {
case Mode::GAME:
player_->update(DELTA_TIME);
checkPlayerIsOnBorder();
checkPlayerAndItems();
@@ -138,8 +138,12 @@ void Game::update() {
checkEndGame();
checkRestoringJail(DELTA_TIME);
checkSomeCheevos();
}
break;
case Mode::DEMO:
demoCheckRoomChange(DELTA_TIME);
break;
}
scoreboard_->update(DELTA_TIME);
keepMusicPlaying();
updateBlackScreen(DELTA_TIME);

View File

@@ -45,7 +45,6 @@ GameOver::GameOver()
// Actualiza el objeto
void GameOver::update() {
// Obtiene el delta time desde el último frame
const float DELTA_TIME = delta_timer_->tick();
elapsed_time_ += DELTA_TIME;

View File

@@ -322,7 +322,6 @@ void LoadingScreen::renderWhiteBorder() {
// Actualiza las variables
void LoadingScreen::update() {
// Obtener delta time desde el último frame
const float DELTA_TIME = delta_timer_->tick();
handleEvents(); // Comprueba los eventos
@@ -355,7 +354,6 @@ void LoadingScreen::update() {
break;
}
// Singletones
Audio::update(); // Actualiza el objeto Audio
Screen::get()->update(DELTA_TIME); // Actualiza el objeto Screen
}

View File

@@ -180,7 +180,6 @@ void Logo::updateState(float delta_time) {
// Actualiza las variables
void Logo::update() {
// Obtener delta time desde el último frame
const float DELTA_TIME = delta_timer_->tick();
handleEvents(); // Comprueba los eventos

View File

@@ -170,7 +170,6 @@ void Title::renderMarquee() {
// Actualiza las variables
void Title::update() {
// Obtener delta time
const float DELTA_TIME = delta_timer_->tick();
handleEvents(); // Comprueba los eventos