caa-game/src/levels/2-6.js

60 lines
1.4 KiB
JavaScript

const tileSize = 32;
const text = require(__dirname + "/../../res/lang/default.js");
let level = {
tiles: [
1, 2, 2, 2, 2, 2, 2, 2, 6,
4, 21, 22, 23, 21, 22, 29, 30, 7,
4, 18, 17, 20, 17, 19, 17, 18, 7,
4, 19, 17, 17, 51, 17, 17, 17, 7,
4, 19, 17, 17, 17, 20, 17, 17, 7,
4, 17, 18, 17, 17, 18, 17, 20, 7,
4, 17, 20, 17, 17, 17, 18, 19, 7,
4, 19, 18, 17, 20, 17, 17, 17, 7,
14, 15, 11, 16, 47, 12, 11, 10, 13,
0, 0, 0, 14, 50, 13, 0, 0, 0, 0,
],
size: {
w: 9 * tileSize,
h: 10 * tileSize
},
startPos: [
{ x: 5 * tileSize, y: 3 * tileSize }
],
entities: [
{
type: "Portal",
pos: { x: 4 * tileSize, y: 8 * tileSize },
texture: "Door_s",
action: (_player, level) => {
level.switch = { module: __dirname + "/2-2.js", pos: 0 };
},
key: "2-6"
},
{
type: "Portal",
pos: { x: 4 * tileSize, y: 3 * tileSize },
texture: "Ladder",
action: (_player, level) => {
level.switch = { module: __dirname + "/0-1.js", pos: 0 };
},
key: ""
},
{
type: "Sign",
pos: { x: 3 * tileSize, y: tileSize },
text: text.game.signs["2-6"]
},
{
type: "Rock",
pos: { x: tileSize, y: 6 * tileSize }
},
{
type: "Rock",
pos: { x: 2 * tileSize, y: 7 * tileSize }
},
]
};
module.exports = level;