Plataformas moviles completadas

This commit is contained in:
2022-08-27 09:36:43 +02:00
parent 43c10d335b
commit 2e102160e6
9 changed files with 61 additions and 12 deletions

View File

@@ -533,13 +533,25 @@ int Map::getActorName(int index)
}
// Devuelve el rectangulo de colisión
int Map::getActorCollider(int index)
SDL_Rect Map::getActorCollider(int index)
{
int y = 0;
SDL_Rect rect = {0, 0, 0, 0};
if (index != -1)
{
y = actors[index]->getCollider().y;
rect = actors[index]->getCollider();
}
return y;
return rect;
}
// Devuelve el desplazamiento relativo del actor
int Map::getActorIncX(int index)
{
int shift = 0;
if (index != -1)
{
shift = actors[index]->getIncX();
}
return shift;
}