Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const dungeon = new Dungeon({
- width: 50,
- height: 50,
- rooms: {
- width: { min: 7, max: 15 },
- height: { min: 7, max: 15 },
- maxRooms: 12
- }
- });
- // Create a blank map
- const map = this.make.tilemap({
- tileWidth: 48,
- tileHeight: 48,
- width: dungeon.width,
- height: dungeon.height
- });
- // Load up a tileset, in this case, the tileset has 1px margin & 2px padding (last two arguments)
- const tileset = map.addTilesetImage("tiles", null, 48, 48, 1, 2);
- // Create an empty layer and give it the name "Layer 1"
- const layer = map.createBlankDynamicLayer("Layer 1", tileset);
Add Comment
Please, Sign In to add comment