Pequeños cambios en las librerias comunes

This commit is contained in:
2022-10-17 19:53:19 +02:00
parent 3d52c45f5c
commit cf357560b2
11 changed files with 99 additions and 73 deletions

View File

@@ -160,11 +160,13 @@ double MovingSprite::getAngle()
return angle;
}
// Establece la posición del objeto
void MovingSprite::setPos(SDL_Rect rect)
// Establece la posición y el tamaño del objeto
void MovingSprite::setRect(SDL_Rect rect)
{
x = (float)rect.x;
y = (float)rect.y;
w = rect.w;
h = rect.h;
}
// Establece el valor de la variable
@@ -333,15 +335,6 @@ SDL_Rect MovingSprite::getRect()
return rect;
}
// Establece los valores de posición y tamaño del sprite
void MovingSprite::setRect(SDL_Rect rect)
{
x = (float)rect.x;
y = (float)rect.y;
w = rect.w;
h = rect.h;
}
// Deshace el último movimiento
void MovingSprite::undoMove()
{