Plataformas moviles completadas
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user