diff --git a/source/game/entities/enemy.cpp b/source/game/entities/enemy.cpp index 35ca6bd5..9f69cd92 100644 --- a/source/game/entities/enemy.cpp +++ b/source/game/entities/enemy.cpp @@ -44,8 +44,8 @@ void Enemy::render() { } // Actualiza las variables del objeto -void Enemy::update() { - sprite_->update(); +void Enemy::update(float delta_time) { + sprite_->update(delta_time); checkPath(); collider_ = getRect(); } diff --git a/source/game/entities/enemy.hpp b/source/game/entities/enemy.hpp index 6c0e4f70..5bd2d751 100644 --- a/source/game/entities/enemy.hpp +++ b/source/game/entities/enemy.hpp @@ -56,7 +56,7 @@ class Enemy { void render(); // Actualiza las variables del objeto - void update(); + void update(float delta_time); // Devuelve el rectangulo que contiene al enemigo auto getRect() -> SDL_FRect; diff --git a/source/game/gameplay/room.cpp b/source/game/gameplay/room.cpp index 74399695..7a9a209c 100644 --- a/source/game/gameplay/room.cpp +++ b/source/game/gameplay/room.cpp @@ -485,7 +485,7 @@ void Room::update(float delta_time) { for (const auto& enemy : enemies_) { // Actualiza los enemigos - enemy->update(); + enemy->update(delta_time); } for (const auto& item : items_) {