Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let groundLayer;
- function preload() {
- this.load.image("tiles", "../assets/tilesets/0x72-industrial-tileset-32px-extruded.png");
- this.load.tilemapTiledJSON("map", "../assets/tilemaps/platformer.json");
- }
- function create() {
- const map = this.make.tilemap({ key: "map" });
- const tiles = map.addTilesetImage("0x72-industrial-tileset-32px-extruded", "tiles");
- map.createDynamicLayer("Background", tiles);
- groundLayer = map.createDynamicLayer("Ground", tiles);
- map.createDynamicLayer("Foreground", tiles);
- }
Add Comment
Please, Sign In to add comment