public GameMap(final OrthographicCamera camera, final TiledMap map, final TiledMapRenderer mapRenderer, final Location parentLocation) { this.camera = camera; this.map = map; this.mapRenderer = mapRenderer; this.parentLocation = parentLocation; mapLayers = new TreeMap<>(); entities = new LinkedList<>(); triggers = new LinkedList<>(); tileTriggers = new HashMap<>(); actionQueue = new LinkedList<>(); animations = new LinkedList<>(); mapEffects = new LinkedList<>(); namedActors = new HashMap<>(); doors = new HashMap<>(); buildMapLayers(map); graphNodeIndex = new TileCoordinate[getNodeCount()]; }
protected final GameMap loadMap(final GraphicsService graphicsService, final AssetManager assetManager, final String mapPath, final Location parentLocation) { if (!assetManager.isLoaded(mapPath, TiledMap.class)) { assetManager.load(mapPath, TiledMap.class); assetManager.finishLoading(); } TiledMap tiledMap = assetManager.get(mapPath); TiledMapRenderer mapRenderer = graphicsService.getTileMapRenderer(tiledMap); return new GameMap(graphicsService.getCamera(), tiledMap, mapRenderer, parentLocation); }
public MapLayer(final int layerIndex, final TiledMapRenderer mapRenderer) { this.layerIndex = layerIndex; this.mapRenderer = mapRenderer; }
@Override public TiledMapRenderer getTileMapRenderer(final TiledMap tiledMap) { return new OrthogonalTiledMapRenderer(tiledMap, spriteBatch); }
public TiledMapRenderer getMapRenderer() { return mapRenderer; }
public void setMapRenderer(TiledMapRenderer mapRenderer) { this.mapRenderer = mapRenderer; }
TiledMapRenderer getTileMapRenderer(TiledMap tiledMap);