use of com.badlogic.gdx.maps.MapLayer in project Entitas-Java by Rubentxu.
the class Box2DMapObjectParser method load.
/**
* creates the given {@link Map Map's} {@link com.badlogic.gdx.maps.MapObjects} in the given {@link World}
*
* @param world the {@link World} to create the {@link com.badlogic.gdx.maps.MapObjects} of the given {@link Map} in
* @param map the {@link Map} which {@link com.badlogic.gdx.maps.MapObjects} to create in the given {@link World}
* @return the given {@link World} with the parsed {@link com.badlogic.gdx.maps.MapObjects} of the given {@link Map} created in it
*/
public World load(World world, Map map) {
if (!ignoreMapUnitScale)
unitScale = getProperty(map.getProperties(), aliases.unitScale, unitScale);
box2dObjectFactory.setUnitScale(unitScale);
tileWidth = getProperty(map.getProperties(), "tilewidth", (int) tileWidth);
tileHeight = getProperty(map.getProperties(), "tileheight", (int) tileHeight);
for (MapLayer mapLayer : map.getLayers()) load(world, mapLayer);
return world;
}
Aggregations