const tileSize = 32; const text = require(__dirname + "/../../res/lang/default.js"); const TextBox = require(__dirname + "/../helpers/textbox.js"); let level = { tiles: [ 1, 2, 2, 5, 6, 4, 21, 22, 23, 7, 4, 17, 17, 17, 7, 4, 17, 17, 17, 7, 4, 17, 17, 17, 7, 14, 16, 18, 12, 13, 0, 14, 50, 13, 0, ], size: { w: 5 * tileSize, h: 7 * tileSize }, startPos: [ { x: 56, y: 64 } ], entities: [ { type: "Chest", pos: { x: 2 * tileSize, y: 2 * tileSize }, action: (player, level) => { level.textbox.add(new TextBox(text.game.keyFind)); player.items.keys.push("1-1_1"); } }, { type: "Portal", pos: { x: 2 * tileSize, y: 5 * tileSize }, texture: "Door_s", action: (_player, level) => { level.switch = { module: __dirname + "/1-2.js", pos: 0 }; }, key: "1-1_1" } ] }; module.exports = level;