linter
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
#include "moving_sprite.hpp" // Para MovingSprite
|
||||
|
||||
// Actualiza la posición y comprueba si ha llegado a su destino (time-based)
|
||||
void SmartSprite::update(float deltaTime) {
|
||||
void SmartSprite::update(float delta_time) {
|
||||
if (enabled_) {
|
||||
MovingSprite::update(deltaTime);
|
||||
MovingSprite::update(delta_time);
|
||||
checkMove();
|
||||
checkFinished(deltaTime);
|
||||
checkFinished(delta_time);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,15 +72,15 @@ void SmartSprite::checkMove() {
|
||||
}
|
||||
|
||||
// Comprueba si ha terminado (time-based)
|
||||
void SmartSprite::checkFinished(float deltaTime) {
|
||||
void SmartSprite::checkFinished(float delta_time) {
|
||||
// Comprueba si ha llegado a su destino
|
||||
on_destination_ = (getPosX() == dest_x_ && getPosY() == dest_y_);
|
||||
|
||||
if (on_destination_) {
|
||||
if (finished_delay_ms_ == 0.0f) {
|
||||
if (finished_delay_ms_ == 0.0F) {
|
||||
finished_ = true;
|
||||
} else {
|
||||
finished_timer_ += deltaTime;
|
||||
finished_timer_ += delta_time;
|
||||
if (finished_timer_ >= finished_delay_ms_) {
|
||||
finished_ = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user