use of com.badlogic.gdx.maps.tiled.TiledMapTileLayer in project ultimate-java by pantinor.
the class CombatScreen method replaceTile.
public void replaceTile(String name, int x, int y) {
if (name == null) {
return;
}
TextureRegion texture = Ultima4.standardAtlas.findRegion(name);
TiledMapTileLayer layer = (TiledMapTileLayer) tmap.getLayers().get("Map Layer");
Cell cell = layer.getCell(x, 11 - 1 - y);
TiledMapTile tmt = new StaticTiledMapTile(texture);
tmt.setId(y * 11 + x);
cell.setTile(tmt);
combatMap.setTile(Ultima4.baseTileSet.getTileByName(name), x, y);
}
Aggregations