-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstage2.h
89 lines (73 loc) · 1.58 KB
/
stage2.h
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//Draw background
drawImage3(0, 0, GRASS_WIDTH, GRASS_HEIGHT, grass);
//Draw Health
drawHealth(life);
//String at bottom
labelMessage = "Forest - Meadow";
labelWidth = 97;
labelColor = GREEN;
//Set spawn
spawnX = 2;
spawnY = 73;
//Move player
teleport(&me, &oldMe, spawnX, spawnY);
//Create path
pathColor = DAMP;
numPaths = 1;
paths[0].x = 0;
paths[0].y = 30;
paths[0].w = 240;
paths[0].h = 100;
//Create Bounds
numBounds = 3;
bounds[0].x = 0;
bounds[0].y = 0;
bounds[0].w = 240;
bounds[0].h = 30;
bounds[0].vis = 0;
bounds[1].x = 0;
bounds[1].y = 0;
bounds[1].w = 1;
bounds[1].h = 160;
bounds[1].vis = 0;
bounds[2].x = 0;
bounds[2].y = 130;
bounds[2].w = 240;
bounds[2].h = 30;
bounds[2].vis = 0;
//Enemy creation
numEnemies = 3;
enemies[0].x = 65;
enemies[0].y = 32;
enemies[0].size = 10;
enemies[0].type = 'v';
enemies[0].color = LEAF;
enemies[0].meta[0] = -1;
enemies[0].meta[1] = 90;
enemies[0].meta[2] = enemies[0].meta[1];
enemies[0].meta[3] = 1;
enemies[1].x = 125;
enemies[1].y = 32;
enemies[1].size = 10;
enemies[1].type = 'v';
enemies[1].color = LEAF;
enemies[1].meta[0] = -1;
enemies[1].meta[1] = 90;
enemies[1].meta[2] = enemies[0].meta[1];
enemies[1].meta[3] = 2;
enemies[2].x = 185;
enemies[2].y = 33;
enemies[2].size = 10;
enemies[2].type = 'v';
enemies[2].color = LEAF;
enemies[2].meta[0] = -1;
enemies[2].meta[1] = 90;
enemies[2].meta[2] = enemies[0].meta[1];
enemies[2].meta[3] = 3;
drawPaths(paths, numPaths, pathColor);
drawBounds(bounds, numBounds);
//Draw text
drawRect(146,0,14,labelWidth,BLACK);
drawString(150, 3, labelMessage, labelColor);
//Change state
state = STAGE2_IDLE;