83 lines
2.3 KiB
JavaScript
83 lines
2.3 KiB
JavaScript
const tileSize = 32;
|
|
|
|
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: "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: "Many secret to the left"
|
|
}
|
|
]
|
|
};
|
|
|
|
module.exports = level; |