-
Notifications
You must be signed in to change notification settings - Fork 0
/
Levels.h
120 lines (87 loc) · 3.31 KB
/
Levels.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#ifndef KOU_YZM104_CGAMEPROJECT_ANGRYSHARKS_LEVELS_H
#define KOU_YZM104_CGAMEPROJECT_ANGRYSHARKS_LEVELS_H
#include "raylib.h"
#include "Menu.h"
#include "Player.h"
#include "Hunts.h"
#include "Enemies.h"
class Levels {
public:
Sound
buttonSound = LoadSound("../resources/audio/sound/button.mp3"),
healSound = LoadSound("../resources/audio/sound/heal.mp3"),
hitSound = LoadSound("../resources/audio/sound/hit.mp3"),
victorySound = LoadSound("../resources/audio/sound/victory.mp3"),
eatingSound = LoadSound("../resources/audio/sound/eating.mp3"),
bombSound = LoadSound("../resources/audio/sound/bomb.mp3");
Texture2D
transparent_black = LoadTexture("../resources/image/transparent_black.png"),
stars = LoadTexture("../resources/image/stars.png"),
firstLevelBackground = LoadTexture("../resources/image/level_1.png"),
secondLevelBackground = LoadTexture("../resources/image/level_2.png"),
shark2 = LoadTexture("../resources/image/shark2.png"),
thirdLevelBackground = LoadTexture("../resources/image/level_3.png"),
shark3 = LoadTexture("../resources/image/shark3.png");;
Rectangle
panelRec = {0, 0,451, 329,},
panelDes = {560, 260, 800, 560},
finalPanelRec = { 452, 2, 449, 274 },
finalPanelDes = { 537, 283, 846, 514 },
mainButtonRec = {246, 0, 82, 83},
mainButtonDes = {885, 580, 150, 152},
mainButtonCompleteDes = { 826, 629, 110, 111 },
mainButtonFinalDes = { 903, 566, 115, 116 },
gameInPauseButtonRec = {246, 166, 82, 83},
gameInPauseButtonDes = {75, 839, 150, 161},
returnButtonDes = {1252, 220, 150, 152},
soundButtonDes = {735, 385, 150, 152},
musicButtonDes = {1035, 385, 150, 152},
playButtonRec = {430, 92,102, 102 },
playButtonDes = {996, 627, 115, 115},
shark2Rec = {0,0,387,119},
shark2Des = { 767, 440, 387, 119 },
shark3Rec = {0,0,489,193},
shark3Des = { 767, 440, 387, 119 };
Vector2
starsDes = { 709, 386 },
origin = {0, 0},
mouse_pos {0, 0};
int id;
Player player;
Menu menu;
Hunts hunts;
Enemies enemies;
bool *startGame;
bool *firstLevelStart;
bool *firstLevelComplete;
bool *secondLevelComplete;
bool *secondLevelShark;
bool *thirdLevelShark;
bool playerAlive = true;
bool pauseGame = false;
bool levelCompleted = false;
float scrollingBack = 0.0f;
bool *soundButton;
bool *musicButton;
float *sound_volume;
float *music_volume;
Levels(int id, Player player, Menu& menu);
void levelInit();
void levelBackground();
void checkHuntCollisions(Player& playerShadow, Hunts& huntsShadow);
void checkEnemyCollisions(Player& playerShadow, Enemies& enemiesShadow);
void dead() const;
void checkDeadButton();
void pause() const;
void checkButton();
void completed() const;
void checkCompletedButton();
void finished() const;
void checkFinishedButton();
void gameInPauseButton() const;
void checkGameInPauseButton();
void drawEffects(Player& playerShadow, Enemies& enemiesShadow);
void setVolume() const;
void setWaitVolume(bool control) const;
};
#endif //KOU_YZM104_CGAMEPROJECT_ANGRYSHARKS_LEVELS_H