Ya detecta las plataformas móviles bajo los pies
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user