56 lines
1.4 KiB
JavaScript
56 lines
1.4 KiB
JavaScript
const tileSize = 32;
|
|
|
|
const text = require(__dirname + "/../../res/lang/default.js");
|
|
const TextBox = require(__dirname + "/../helpers/textbox.js");
|
|
|
|
let level = {
|
|
tiles: [
|
|
1, 2, 5, 2, 5, 2, 5, 2, 5, 6,
|
|
4, 21, 22, 23, 21, 22, 23, 24, 25, 7,
|
|
4, 19, 18, 17, 17, 19, 17, 17, 18, 7,
|
|
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
|
4, 17, 18, 17, 20, 17, 17, 17, 17, 7,
|
|
4, 20, 17, 17, 17, 19, 17, 20, 17, 7,
|
|
4, 17, 17, 17, 20, 17, 17, 17, 19, 7,
|
|
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
|
4, 18, 17, 17, 17, 17, 19, 17, 17, 7,
|
|
14, 11, 16, 47, 49, 11, 11, 11, 11, 13,
|
|
0, 0, 14, 50, 13, 0, 0, 0, 0, 0, 0,
|
|
],
|
|
size: {
|
|
w: 10 * tileSize,
|
|
h: 11 * tileSize
|
|
},
|
|
startPos: [
|
|
{ x: 7 * tileSize, y: 6.8 * tileSize }
|
|
],
|
|
entities: [
|
|
{
|
|
type: "Portal",
|
|
pos: { x: 3 * tileSize, y: 9 * tileSize },
|
|
texture: "Door_s",
|
|
action: (_player, level) => {
|
|
level.switch = { module: __dirname + "/3-1.js", pos: 1 };
|
|
},
|
|
key: ""
|
|
},
|
|
{
|
|
type: "Chest",
|
|
pos: { x: 8 * tileSize, y: 2 * tileSize },
|
|
action: (player, level) => {
|
|
level.textbox.add(new TextBox(text.game.keyFind));
|
|
player.items.keys.push("2-6");
|
|
}
|
|
},
|
|
{
|
|
type: "Mage",
|
|
pos: { x: 7 * tileSize, y: 3 * tileSize }
|
|
},
|
|
{
|
|
type: "Mage",
|
|
pos: { x: 2 * tileSize, y: 7 * tileSize }
|
|
}
|
|
]
|
|
};
|
|
|
|
module.exports = level; |