-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMapData.cs
More file actions
58 lines (50 loc) · 3.51 KB
/
MapData.cs
File metadata and controls
58 lines (50 loc) · 3.51 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
namespace PacmanGameProject.Game.Engine;
public static class MapData
{
//Matriz que representa o map do jogo usando tiles
// Cada um desses números corresponde a um tipo de tile (parede, chao, pellet, ...)
public static readonly int[,] Layout = new int[,]
{
{6,33,33,33,33,33,33,33,33,33,33,33,33,34, 31,33,33,33,33,33,33,33,33,33,33,33,33,3},
{12,40,40,40,40,40,40,40,40,40,40,40,40,26, 26,40,40,40,40,40,40,40,40,40,40,40,40,9},
{12,40,22,14,14,19,40,22,14,14,14,19,40,26, 26,40,22,14,14,14,19,40,22,14,14,19,40,9},
{12,46,29,37,37,26,40,29,37,37,37,26,40,26, 26,40,29,37,37,37,26,40,29,37,37,26,46,9},
{12,40,28,14,14,25,40,28,14,14,14,25,40,28, 25,40,28,14,14,14,25,40,28,14,14,25,40,9},
{12,40,40,40,40,40,40,40,40,40,40,40,40,40, 40,40,40,40,40,40,40,40,40,40,40,40,40,9},
{12,40,22,14,14,19,40,22,19,40,22,14,14,14, 14,14,14,19,40,22,19,40,22,14,14,19,40,9},
{12,40,28,14,14,25,40,26,29,40,28,14,14,10, 7,14,14,25,40,29,26,40,28,14,14,25,40,9},
{12,40,40,40,40,40,40,26,29,40,40,40,40,29, 29,40,40,40,40,29,26,40,40,40,40,40,40,9},
{18,42,42,42,42,19,40,26,28,14,14,19,37,29, 29,37,22,14,14,32,26,40,23,42,42,42,42,15},
{37,37,37,37,37,12,40,26,22,14,14,25,37,28, 25,37,28,14,14,19,26,40,9,37,37,37,37,37},
{37,37,37,37,37,12,40,26,29,37,37,37,37,37, 37,37,37,37,37,29,26,40,9,37,37,37,37,37},
{37,37,37,37,37,12,40,26,29,37,41,42,42,99, 99,42,42,38,37,29,26,40,9,37,37,37,37,37},
{33,33,33,33,33,25,40,28,25,37,9,37,37,37, 37,37,37,12,37,28,25,40,35,36,36,36,36,36},
{37,37,37,37,37,37,40,37,37,37,9,37,37,37, 37,37,37,12,37,37,37,40,37,37,37,37,37,37},
{42,42,42,42,42,19,40,22,19,37,9,37,37,37, 37,37,37,12,37,22,19,40,22,42,42,42,42,42},
{37,37,37,37,37,12,40,29,26,37,47,36,36,36, 36,36,36,44,37,29,26,40,9,37,37,37,37,37},
{37,37,37,37,37,12,40,29,26,37,37,37,37,37, 37,37,37,37,37,29,26,40,9,37,37,37,37,37},
{37,37,37,37,37,12,40,29,26,37,22,14,14,14, 14,14,14,19,37,29,26,40,9,37,37,37,37,37},
{6,33,33,33,33,25,40,28,25,37,28,14,14,19, 7,14,14,25,37,28,25,40,35,36,36,36,36,3},
{12,40,40,40,40,40,40,40,40,40,40,40,40,29, 29,40,40,40,40,40,40,40,40,40,40,40,40,9},
{12,40,22,14,14,19,40,22,14,14,14,19,40,29, 29,40,22,14,14,14,19,40,22,14,14,19,40,9},
{12,40,28,14,19,26,40,28,14,14,14,25,40,28, 25,40,28,14,14,14,25,40,29,22,14,25,40,9},
{12,46,40,40,29,26,40,40,40,40,40,40,40,37, 37,40,40,40,40,40,40,40,29,29,40,40,46,9},
{24,14,19,40,29,26,40,22,19,40,22,14,14,14, 14,14,14,19,40,22,19,40,29,29,40,22,14,16},
{30,14,25,40,28,25,40,29,26,40,28,14,14,19, 7,14,14,25,40,29,29,40,28,25,40,35,14,8},
{12,40,40,40,40,40,40,29,26,40,40,40,40,29, 29,40,40,40,40,29,29,40,40,40,40,40,40,9},
{12,40,22,14,14,14,14,16,13,14,14,19,40,29, 29,40,22,14,14,25,28,14,14,14,14,19,40,9},
{12,40,28,14,14,14,14,14,14,14,14,25,40,28, 25,40,28,14,14,14,14,14,14,14,14,25,40,9},
{12,40,40,40,40,40,40,40,40,40,40,40,40,40, 40,40,40,40,40,40,40,40,40,40,40,40,40,9},
{18,42,42,42,42,42,42,42,42,42,42,42,42,42, 42,42,42,42,42,42,42,42,42,42,42,42,42,15}
};
// Verifica se um tile é parede ou não
public static bool IsWall(int tileId)
{
// NÃO são parede
if (tileId == 37 || tileId == 40 || tileId == 46 || tileId == 99)
return false;
// Qualquer outro tile vai ser parede
return true;
}
public const int GHOST_DOOR = 99;
}