-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
69 lines (53 loc) · 1.19 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
68
69
#ifndef GAME_H
#define GAME_H
#define PI 3.14159265359
#include "SDL.h"
#include "SDL_opengl.h"
#include "Camera.h"
#include "Text.h"
#include "Player.h"
#include "ObjectLoader.h"
#include "Map.h"
#include "Mob.h"
#include "Ammo.h"
#include "Obstacle.h"
//#include "Constants.h"
class Game
{
public:
Game();
void init();
void start();
void stop();
protected:
private:
ObjectLoader objLoad;
std::vector<Obstacle*> obstacles;
std::vector<Mob*> mobs;
bool debugMode = false;
int width = 800, height = 600;
float startX,startY;
float disc =0;
SDL_Event event;
Uint32 startTime;
///Objects
Camera camera;
Text text;
Player player;
Map gameMap;
Mob evilPing;
Ammo ammoUsing;
Ammo explode;
Obstacle obst;
///Buttons
int arrowKeys;
///END Buttons
bool isRunning,focusPlayer;
void update();
void render();
void debug();
void readKeyPress(SDL_Event*);
void setupGame();
float dist_Point_to_Line( Vec2 P, Vec2 l1, Vec2 l2);
};
#endif // GAME_H