Añadidas las funciones incPosX e incPosY a sprite.h
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user