Scratch for Java

TiledMap::showLayer()

Shows a tile layer of the map in a layer of the stage, drawn every frame from now on (only the tiles the camera shows). The map's top left corner is at (0, 0) of the world; the map extends right and down.

map.showLayer("ground", Layer.BACKGROUND);
map.showLayer("trees", Layer.FOREGROUND);

Syntax

Java

.showLayer(name, layer)

Parameters

Name Data Type Description
name String the tile layer's name in Tiled
layer Layer the stage's layer to draw it in

Return

void

showLayer()

Create Shareable URL

Select Sections