-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.h
68 lines (63 loc) · 1.27 KB
/
game.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
#pragma once
#include <stdio.h>
#include <iostream>
#include <vector>
#include "SDL.h"
#include "SDL_image.h"
#include "environment.h"
#include "rain.h"
#include "entitySet.h"
#include "entity.h"
#include "enemyBrain.h"
#include "healthBar.h"
class game
{
public:
bool active;
bool menuActive=true;
bool startMenu=true;
bool characterSelect = true;
game(Uint16 width, Uint16 height);
~game();
void update();
void render();
void menuUpdate();
void menuRender();
void startRain();
private:
SDL_Window * window;
SDL_Renderer * renderer;
Uint16 window_width;
Uint16 window_height;
Uint64 now;
Uint64 last = 0;
double currentTime = 0;
environment environment;
entity player;
entity enemy;
enemyBrain enemyBrain;
std::string playerSelect = "AA";
std::string lvlSelect = "alpha";
std::vector<rain> weather;
SDL_Rect qRect;
SDL_Rect pRect;
SDL_Rect playerSelectionRect;
SDL_Rect AARect;
SDL_Rect SeaRect;
SDL_Rect alphaRect;
SDL_Rect omegaRect;
SDL_Rect levelSelectionRect;
SDL_Rect charRect;
SDL_Rect arrowRect;
SDL_Texture* qTex;
SDL_Texture* pTex;
SDL_Texture* AATex;
SDL_Texture* SeaTex;
SDL_Texture* alphaTex;
SDL_Texture* omegaTex;
SDL_Texture* arrowTex;
healthBar playerHealth;
healthBar enemyHealth;
bool gameOver = false;
bool victory = false;
};