Añadido el procedimiento reLoadTexture a todos los objetos que lo necesitaban

This commit is contained in:
2022-09-01 20:25:25 +02:00
parent 4e219c47f6
commit 31dea2aeea
16 changed files with 165 additions and 76 deletions

View File

@@ -48,7 +48,7 @@ void Enemy::render()
void Enemy::update()
{
sprite->update();
//sprite->animate();
// sprite->animate();
checkPath();
collider = getRect();
}
@@ -77,4 +77,10 @@ SDL_Rect Enemy::getRect()
SDL_Rect &Enemy::getCollider()
{
return collider;
}
// Recarga la textura
void Enemy::reLoadTexture()
{
texture->reLoad();
}