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