Level design #1
@ -2,54 +2,35 @@ const tileSize = 32;
|
||||
|
||||
let level = {
|
||||
tiles: [
|
||||
1, 2, 2, 2, 2, 2, 2, 2, 5, 6,
|
||||
4, 21, 22, 23, 21, 22, 23, 21, 22, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
4, 17, 17, 17, 17, 17, 17, 17, 17, 7,
|
||||
14, 15, 11, 11, 16, 18, 12, 11, 10, 13,
|
||||
0, 0, 0, 0, 14, 48, 13, 0, 0, 0
|
||||
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: 10 * tileSize,
|
||||
h: 20 * tileSize
|
||||
w: 5 * tileSize,
|
||||
h: 7 * tileSize
|
||||
},
|
||||
startPos: [
|
||||
{ x: 48, y: 64 },
|
||||
{ x: 48, y: 128 }
|
||||
{ x: 56, y: 64 }
|
||||
],
|
||||
entities: [
|
||||
{
|
||||
type: "Mage",
|
||||
pos: { x: 1 * tileSize, y: 8 * tileSize }
|
||||
},
|
||||
{
|
||||
type: "Chest",
|
||||
pos: { x: 4 * tileSize, y: 2 * tileSize },
|
||||
pos: { x: 2 * tileSize, y: 2 * tileSize },
|
||||
action: (player) => {
|
||||
player.items.keys.push("1-1_1");
|
||||
}
|
||||
},
|
||||
{
|
||||
type: "Portal",
|
||||
pos: { x: 5 * tileSize, y: 19 * tileSize },
|
||||
pos: { x: 2 * tileSize, y: 5 * tileSize },
|
||||
texture: "Door_s",
|
||||
action: (_player, level) => {
|
||||
level.switch = { module: "./src/levels/1-2.js", pos: 0 };
|
||||
level.switch = { module: __dirname + "/1-2.js", pos: 0 };
|
||||
},
|
||||
key: "1-1_1"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user