Añadidas las funciones incPosX e incPosY a sprite.h

This commit is contained in:
2024-06-14 09:59:42 +02:00
parent 95f19c0cd8
commit 9cb421de1d
2 changed files with 19 additions and 1 deletions

View File

@@ -186,4 +186,16 @@ void Sprite::setRect(SDL_Rect rect)
y = rect.y;
w = rect.w;
h = rect.h;
}
// Incrementa el valor de la variable
void Sprite::incPosX(int value)
{
x += value;
}
// Incrementa el valor de la variable
void Sprite::incPosY(int value)
{
y += value;
}