use of com.badlogic.gdx.maps.tiled.TiledMap in project Entitas-Java by Rubentxu.
the class MapEntityParser method load.
public void load(String scene) {
TiledMap map = loader.load(scene);
MapObjects characters = map.getLayers().get("Characters").getObjects();
MapObjects statics = map.getLayers().get("Statics").getObjects();
for (MapObject object : characters) {
String type = object.getProperties().get(aliases.Character, "", String.class);
if (type != null)
baseSceneManager.createEntity(type);
}
for (MapObject object : statics) {
String type = object.getProperties().get(aliases.Statics, "", String.class);
if (type != null)
baseSceneManager.createEntity(type);
}
}
Aggregations