Açò ja no hi ha Cristo que ho pete

This commit is contained in:
2024-10-10 13:48:53 +02:00
parent fc8fdc5fe5
commit 9e5f41644e
7 changed files with 27 additions and 23 deletions

View File

@@ -19,20 +19,18 @@ void SmartSprite::init()
destX_ = 0;
destY_ = 0;
finished_ = false;
enabled_ = false;
}
// Actualiza la posición y comprueba si ha llegado a su destino
void SmartSprite::update()
{
MovingSprite::update();
checkMove();
checkFinished();
}
// Pinta el objeto en pantalla
void SmartSprite::render()
{
MovingSprite::render();
if (enabled_)
{
MovingSprite::update();
checkMove();
checkFinished();
}
}
// Establece el valor de la variable