94 lines
2.6 KiB
JavaScript
94 lines
2.6 KiB
JavaScript
const tileSize = 32;
|
|
|
|
const text = require(__dirname + "/../../res/lang/default.js");
|
|
const TextBox = require(__dirname + "/../helpers/textbox.js");
|
|
|
|
let level = {
|
|
tiles: [
|
|
1, 52, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 6,
|
|
4, 21, 22, 23, 21, 22, 23, 21, 22, 23, 21, 22, 23, 21, 22, 23, 21, 22, 23, 7,
|
|
4, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
|
4, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
|
4, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
|
14, 48, 47, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 16, 47, 12, 11, 10, 13,
|
|
0, 14, 50, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 50, 13, 0, 0, 0, 0,
|
|
],
|
|
size: {
|
|
w: 20 * tileSize,
|
|
h: 7 * tileSize
|
|
},
|
|
startPos: [
|
|
{ x: 5 * tileSize, y: 3 * tileSize }
|
|
],
|
|
entities: [
|
|
{
|
|
type: "Portal",
|
|
pos: { x: 9 * tileSize, y: 1 * tileSize },
|
|
texture: "Door_n",
|
|
action: (_player, level) => {
|
|
level.switch = { module: __dirname + "/2-1.js", pos: 0 };
|
|
},
|
|
key: "1-4"
|
|
},
|
|
{
|
|
type: "Chest",
|
|
pos: { x: 1 * tileSize, y: 2 * tileSize },
|
|
action: (player, level) => {
|
|
level.textbox.add(new TextBox(text.game.lifeBoost));
|
|
player.lives = 5;
|
|
}
|
|
},
|
|
{
|
|
type: "Portal",
|
|
pos: { x: 4 * tileSize, y: 1 * tileSize },
|
|
texture: "Door_n",
|
|
action: (_player, level) => {
|
|
level.switch = { module: __dirname + "/2-3.js", pos: 0 };
|
|
},
|
|
key: "2-3"
|
|
},
|
|
{
|
|
type: "Portal",
|
|
pos: { x: 2 * tileSize, y: 5 * tileSize },
|
|
texture: "Door_s",
|
|
action: (_player, level) => {
|
|
level.switch = { module: __dirname + "/2-4.js", pos: 0 };
|
|
},
|
|
key: ""
|
|
},
|
|
{
|
|
type: "Portal",
|
|
pos: { x: 15 * tileSize, y: 5 * tileSize },
|
|
texture: "Door_s",
|
|
action: (_player, level) => {
|
|
level.switch = { module: __dirname + "/2-5.js", pos: 0 };
|
|
},
|
|
key: ""
|
|
},
|
|
{
|
|
type: "Portal",
|
|
pos: { x: 17 * tileSize, y: 3 * tileSize },
|
|
texture: "Ladder",
|
|
action: (_player, level) => {
|
|
level.switch = { module: __dirname + "/3-1.js", pos: 0 };
|
|
},
|
|
key: "3-1"
|
|
},
|
|
{
|
|
type: "Portal",
|
|
pos: { x: 15 * tileSize, y: tileSize },
|
|
texture: "Door_hidden",
|
|
action: (_player, level) => {
|
|
level.switch = { module: __dirname + "/2-6.js", pos: 0 };
|
|
},
|
|
key: "2-6"
|
|
},
|
|
{
|
|
type: "Sign",
|
|
pos: { x: 14 * tileSize, y: tileSize },
|
|
text: text.game.signs["2-2"]
|
|
}
|
|
]
|
|
};
|
|
|
|
module.exports = level; |