use of com.watabou.noosa.CompositeImage in project pixel-dungeon-remix by NYRDS.
the class VariativeDungeonTilemap method tile.
@Override
public Image tile(int pos) {
CompositeImage img = new CompositeImage(getTexture());
img.frame(getTileset().get(data[pos]));
Image deco = new Image(getTexture());
deco.frame(getTileset().get(mDecoMap[pos]));
img.addLayer(deco);
return img;
}
use of com.watabou.noosa.CompositeImage in project pixel-dungeon-remix by NYRDS.
the class CustomLayerTilemap method tile.
@Override
public Image tile(int pos) {
ArrayList<Image> imgs = new ArrayList<>();
if (data[pos] >= 0) {
Image img = new Image(getTexture());
img.frame(getTileset().get(data[pos]));
imgs.add(img);
}
for (CustomLayerTilemap layer : mLayers) {
if (layer.data[pos] >= 0) {
Image img = new Image(layer.getTexture());
img.frame(layer.getTileset().get(layer.data[pos]));
imgs.add(img);
}
}
if (!imgs.isEmpty()) {
return new CompositeImage(imgs);
}
return null;
}
Aggregations