// Carga los objetos móviles del nivel actual
for (MapObject object : map.getLayers().get("objects").getObjects()) {
if (object instanceof RectangleMapObject) {
RectangleMapObject rectangleObject = (RectangleMapObject) object;
if (rectangleObject.getProperties().containsKey(TiledMapManager.MOBILE)) {
Rectangle rect = rectangleObject.getRectangle();
Direction direction = null;
if (Boolean.valueOf((String) rectangleObject.getProperties().get("right_direction")))
direction = Direction.RIGHT;
else
direction = Direction.LEFT;
platform = new Platform(rect.x, rect.y, TiledMapManager.PLATFORM_WIDTH, TiledMapManager.PLATFORM_HEIGHT,
Integer.valueOf((String) rectangleObject.getProperties().get("offset")), direction);
platforms.add(platform);
}
}
}
}