commit de acabar la jornada laboral
This commit is contained in:
@@ -23,13 +23,13 @@ void Sprite::render()
|
||||
}
|
||||
|
||||
// Obten el valor de la variable
|
||||
int Sprite::getPosX() const
|
||||
int Sprite::getX() const
|
||||
{
|
||||
return pos_.x;
|
||||
}
|
||||
|
||||
// Obten el valor de la variable
|
||||
int Sprite::getPosY() const
|
||||
int Sprite::getY() const
|
||||
{
|
||||
return pos_.y;
|
||||
}
|
||||
@@ -47,33 +47,33 @@ int Sprite::getHeight() const
|
||||
}
|
||||
|
||||
// Establece la posición del objeto
|
||||
void Sprite::setPos(int x, int y)
|
||||
void Sprite::setPosition(int x, int y)
|
||||
{
|
||||
pos_.x = x;
|
||||
pos_.y = y;
|
||||
}
|
||||
|
||||
// Establece la posición del objeto
|
||||
void Sprite::setPos(SDL_Point p)
|
||||
void Sprite::setPosition(SDL_Point p)
|
||||
{
|
||||
pos_.x = p.x;
|
||||
pos_.y = p.y;
|
||||
}
|
||||
|
||||
// Establece la posición del objeto
|
||||
void Sprite::setPos(SDL_Rect r)
|
||||
void Sprite::setPosition(SDL_Rect r)
|
||||
{
|
||||
pos_ = r;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
void Sprite::setPosX(int x)
|
||||
void Sprite::setX(int x)
|
||||
{
|
||||
pos_.x = x;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
void Sprite::setPosY(int y)
|
||||
void Sprite::setY(int y)
|
||||
{
|
||||
pos_.y = y;
|
||||
}
|
||||
@@ -121,19 +121,19 @@ void Sprite::setTexture(std::shared_ptr<Texture> texture)
|
||||
}
|
||||
|
||||
// Devuelve el rectangulo donde está el sprite
|
||||
SDL_Rect Sprite::getPos() const
|
||||
SDL_Rect Sprite::getPosition() const
|
||||
{
|
||||
return pos_;
|
||||
}
|
||||
|
||||
// Incrementa el valor de la variable
|
||||
void Sprite::incPosX(int value)
|
||||
void Sprite::incX(int value)
|
||||
{
|
||||
pos_.x += value;
|
||||
}
|
||||
|
||||
// Incrementa el valor de la variable
|
||||
void Sprite::incPosY(int value)
|
||||
void Sprite::incY(int value)
|
||||
{
|
||||
pos_.y += value;
|
||||
}
|
||||
Reference in New Issue
Block a user