-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathLevel.js
More file actions
executable file
·74 lines (66 loc) · 3.58 KB
/
Level.js
File metadata and controls
executable file
·74 lines (66 loc) · 3.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
var Level = {
world: [[]],
worldSize: 37, // tiles
tileSize: 32, // pixels
map: [[2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2],
[2,2,2,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,2,2],
[2,2,3,3,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,2],
[2,3,3,0,0,0,0,0,0,1,0,0,0,1,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3],
[3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3],
[3,0,0,0,0,0,1,0,0,0,0,0,3,2,2,2,2,2,2,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3],
[3,0,0,0,0,0,0,0,0,0,0,0,3,2,2,2,2,2,2,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3],
[3,0,0,0,0,0,0,0,0,0,0,0,0,3,2,2,2,2,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3],
[3,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,2],
[3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
],
npcs: [{id: 0, name: "Egon der Schankwirt", x: 7, y: 5, questID: 0},
{id: 1, name: "Hugo der Ritter", x: 7, y: 8, questID: null},
{id: 2, name: "Rupert der Kräutermixer", x: 8, y: 6, questID: 2}
],
getMap: function(num) {
for (var x = 0; x < this.worldSize; x++) {
this.world[x] = [];
for (var y = 0; y < this.worldSize; y++) {
this.world[x][y] = this.map[y][x];
}
}
return this.world;
},
getNpcList: function() {
return this.npcs;
},
getWorldSize: function() {
return this.worldSize;
},
getTileSize: function() {
return this.tileSize;
},
}
exports.Level = Level;