Ya detecta las plataformas móviles bajo los pies

This commit is contained in:
2022-08-26 20:41:48 +02:00
parent 5ff62a6950
commit dda1e049c6
9 changed files with 122 additions and 18 deletions

View File

@@ -304,6 +304,20 @@ bool Player::isOnFloor()
return onFloor;
}
// Comprueba si el jugador tiene una plataforma movil bajo sus pies
bool Player::isOnMovingPlatform()
{
bool onMovingPlatform = false;
updateFeet();
for (auto f : underFeet)
{
onMovingPlatform |= (map->getActorName(map->actorCollision(f)) == a_moving_platform);
}
return onMovingPlatform;
}
// Comprueba si está situado en alguno de los cuatro bordes de la habitación
bool Player::isOnScreenBorder()
{