-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenu.h
105 lines (77 loc) · 3.01 KB
/
Menu.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
#ifndef KOU_YZM104_CGAMEPROJECT_ANGRYSHARKS_MENU_H
#define KOU_YZM104_CGAMEPROJECT_ANGRYSHARKS_MENU_H
#include "raylib.h"
class Menu {
public:
Music
menuMusic = LoadMusicStream("../resources/audio/music/menu_music.mp3"),
ocean = LoadMusicStream("../resources/audio/music/ocean.mp3");
Sound
buttonSound = LoadSound("../resources/audio/sound/button.mp3");
Texture2D
transparent_black = LoadTexture("../resources/image/transparent_black.png"),
menuSharks = LoadTexture("../resources/image/menu_sharks.png"),
menuBackground = LoadTexture("../resources/image/background.png"),
menuButtons = LoadTexture("../resources/image/buttons.png"),
menuPanels = LoadTexture("../resources/image/panels.png"),
infoScreen = LoadTexture("../resources/image/info_screen.png");
Rectangle
menuBackgroundRec = {0, 0, 1920, 1080},
menuBackgroundDes = {0,0, 1920, 1080},
soundButtonRec = {82, 415, 82, 83},
muteButtonRec = {82, 332, 82, 83},
soundButtonDes = {1561, 28, 100, 101},
musicButtonRec = {82, 249, 82, 83},
musicMuteButtonRec = {82, 166, 82, 83},
musicButtonDes = {1682, 28, 100, 101},
returnButtonRec = {246, 415, 82, 83},
returnButtonDes = {50, 28, 100, 101},
infoButtonRec = {420, 0, 92, 92},
infoButtonDes = {1124, 881, 130, 130},
levelButtonRecLight = {901, 114, 243, 114},
levelButtonRecDark = { 901, 0, 243, 114 },
firstLevelButtonDes = {1518, 337, 298, 144},
secondLevelButtonDes = {1518, 492, 298, 144},
thirdLevelButtonDes = {1518, 646, 298, 144},
firstMenuSharkRec = {525, 0, 113, 36},
firstMenuSharkDes = {1572, 379, 190, 69},
secondMenuSharkRec = {393, 0, 132, 42},
secondMenuSharkLineRec = {423, 81, 144, 52},
secondMenuSharkLineDes = {1572, 529, 190, 69},
thirdMenuSharkRec = {260, 0, 133, 52},
thirdMenuSharkLineRec = {279, 81, 144, 63},
thirdMenuSharkLineDes = {1572, 673, 190, 83};
Vector2
origin = {0, 0},
mouse_pos = { 0, 0 };
float sound_volume = 0.03;
float music_volume = 0.03;
bool init = true;
bool exitGame = false;
bool startGame = false;
bool info = false;
bool soundButton = true;
bool musicButton = true;
bool firstLevelStart = false;
bool firstLevelComplete = false;
bool secondLevelComplete = false;
bool secondLevelShark = false;
bool thirdLevelShark = false;
//Raylib Animation Things//
int logoPositionX = GetScreenWidth()/2 - 128;
int logoPositionY = GetScreenHeight()/2 - 128;
int framesCounter = 0;
int letterCount = 0;
int topSideRecWidth = 16;
int leftSideRecHeight = 16;
int bottomSideRecWidth = 16;
int rightSideRecHeight = 16;
int state = 0;
float alpha = 1.0f;
//--//
void raylib_animation();
void draw();
void drawInfo();
void checkButton();
};
#endif //KOU_YZM104_CGAMEPROJECT_ANGRYSHARKS_MENU_H