Plataformas moviles completadas
This commit is contained in:
@@ -21,14 +21,12 @@ void ActorMovingPlatform::checkPath()
|
||||
if (sprite->getPosX() > p2.x || sprite->getPosX() < p1.x)
|
||||
{
|
||||
sprite->setVelX(sprite->getVelX() * (-1));
|
||||
//sprite->flip();
|
||||
}
|
||||
|
||||
// Comprueba los límites verticales
|
||||
if (sprite->getPosY() > p2.y || sprite->getPosY() < p1.y)
|
||||
{
|
||||
sprite->setVelY(sprite->getVelY() * (-1));
|
||||
//sprite->flip();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user