Files
tower/js/layer.js

12 lines
324 B
JavaScript
Raw Permalink Normal View History

2021-05-09 04:58:29 +00:00
export class Layer {
2021-05-17 04:26:18 +00:00
constructor(level, tileset) {
2021-05-11 03:41:01 +00:00
this.level = level;
this.tileset = tileset;
2021-05-09 04:58:29 +00:00
}
2021-05-11 03:41:01 +00:00
add_tile(tile_factory, y) {
const tile = tile_factory.build(this.tileset);
tile.elem.style.zIndex = `${this.level + y}`;
2021-05-11 03:12:32 +00:00
return tile;
2021-05-09 04:58:29 +00:00
}
}
//# sourceMappingURL=layer.js.map