Guest User

Untitled

a guest
Jul 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. const dungeon = new Dungeon({
  2. width: 50,
  3. height: 50,
  4. rooms: {
  5. width: { min: 7, max: 15 },
  6. height: { min: 7, max: 15 },
  7. maxRooms: 12
  8. }
  9. });
  10.  
  11. // Create a blank map
  12. const map = this.make.tilemap({
  13. tileWidth: 48,
  14. tileHeight: 48,
  15. width: dungeon.width,
  16. height: dungeon.height
  17. });
  18.  
  19. // Load up a tileset, in this case, the tileset has 1px margin & 2px padding (last two arguments)
  20. const tileset = map.addTilesetImage("tiles", null, 48, 48, 1, 2);
  21.  
  22. // Create an empty layer and give it the name "Layer 1"
  23. const layer = map.createBlankDynamicLayer("Layer 1", tileset);
Add Comment
Please, Sign In to add comment