final int layerHeight = layer.getHeight(); final float layerTileWidth = layer.getTileWidth() * unitScale; final float layerTileHeight = layer.getTileHeight() * unitScale;
final int layerHeight = layer.getHeight(); final float layerTileWidth = layer.getTileWidth() * unitScale; final float layerTileHeight = layer.getTileHeight() * unitScale;
} else { TiledMapTileLayer tmtl = (TiledMapTileLayer)map.getLayers().get(0); hexSideLength = 0.5f * tmtl.getTileWidth();
} else { TiledMapTileLayer tmtl = (TiledMapTileLayer)map.getLayers().get(0); hexSideLength = 0.5f * tmtl.getTileWidth();
final int layerHeight = layer.getHeight(); final float layerTileWidth = layer.getTileWidth() * unitScale; final float layerTileHeight = layer.getTileHeight() * unitScale;
final float layerTileWidth = layer.getTileWidth() * unitScale; final float layerTileHeight = layer.getTileHeight() * unitScale;
final float layerTileWidth = layer.getTileWidth() * unitScale; final float layerTileHeight = layer.getTileHeight() * unitScale;
final int layerHeight = layer.getHeight(); final float layerTileWidth = layer.getTileWidth() * unitScale; final float layerTileHeight = layer.getTileHeight() * unitScale;
final int layerHeight = layer.getHeight(); final float layerTileWidth = layer.getTileWidth() * unitScale; final float layerTileHeight = layer.getTileHeight() * unitScale;
final int layerHeight = layer.getHeight(); final float layerTileWidth = layer.getTileWidth() * unitScale; final float layerTileHeight = layer.getTileHeight() * unitScale;
final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity()); float tileWidth = layer.getTileWidth() * unitScale; float tileHeight = layer.getTileHeight() * unitScale;
final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity()); float tileWidth = layer.getTileWidth() * unitScale; float tileHeight = layer.getTileHeight() * unitScale;
.... private TiledMapTileLayer MetaLayer; float oldY, oldX, tileWidth, tileHeight; public Player (Sprite sprite, TiledMapTileLayer Meta){ super(sprite); this.MetaLayer = Meta; tileWidth = MetaLayer.getTileWidth(); tileHeight = MetaLayer.getTileHeight(); /** Recommended **/ oldY = getY(); oldX = getX(); } ....
TiledMapTileLayer layer0 = (TiledMapTileLayer) map.getLayers().get(0); Vector3 center = new Vector3(layer0.getWidth() * layer0.getTileWidth() / 2, layer0.getHeight() * layer0.getTileHeight() / 2, 0); camera.position.set(center);
final int layerHeight = layer.getHeight(); final float layerTileWidth = layer.getTileWidth() * unitScale; final float layerTileHeight = layer.getTileHeight() * unitScale;
} else { TiledMapTileLayer tmtl = (TiledMapTileLayer)map.getLayers().get(0); hexSideLength = 0.5f * tmtl.getTileWidth();
float cameraMaxX = layer.getWidth() * layer.getTileWidth() - cameraMinX; float cameraMaxY = layer.getHeight() * layer.getTileHeight() - cameraMinY;
float cameraMaxX = layer.getWidth() * layer.getTileWidth() - cameraMinX; float cameraMaxY = layer.getHeight() * layer.getTileHeight() - cameraMinY;
float cameraMaxX = layer.getWidth() * layer.getTileWidth() * WORLD_TO_SCREEN - cameraMinX; float cameraMaxY = layer.getHeight() * layer.getTileHeight() * WORLD_TO_SCREEN - cameraMinY;
final float color = Color.toFloatBits(batchColor.r, batchColor.g, batchColor.b, batchColor.a * layer.getOpacity()); float tileWidth = layer.getTileWidth() * unitScale; float tileHeight = layer.getTileHeight() * unitScale;