-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.h
More file actions
76 lines (62 loc) · 1.31 KB
/
Game.h
File metadata and controls
76 lines (62 loc) · 1.31 KB
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
#pragma once
#include <iostream>
#include <ctime>
#include <vector>
#include <sstream>
#include <string>
#include "Player.h"
#include "Ball.h"
class Game
{
private:
//Window
sf::VideoMode videoMode;
sf::RenderWindow* window;
sf::Event sfmlEvent;
bool endGame;
//Game objects
Player player;
std::vector<Ball> balls;
sf::Font guiFont;
std::string guiFontName = "../Fonts/PixellettersFull.ttf";
sf::Font endGameFont;
std::string endGameFontName = "../Fonts/defused.ttf";
sf::Text guiText;
sf::Text endGameText;
//Variables
float spawnTimerMax;
float spawnTimer;
unsigned maxBalls;
int damagingBallsMax;
int damagingBalls;
int healingBallsMax;
int healingBalls;
unsigned points;
//Private functions
void initVariables();
void initWindow();
//void initFonts(sf::Font* font , std::string* fontName);
void initGuiFont();
void initEndGameFont();
void initGuiText();
void initEndGameText();
public:
//Constructors and Distructors
Game();
~Game();
//Accessors
const bool& getEndGame() const;
//Modifiers
//Functins
const bool running() const;
void pollEvents();
const int randBallType() const;
void spawnBalls();
void updatePlayer();
void updateCollision();
void updateGuiText();
void updateEndGameText();
void update();
void renderGuiText(sf::RenderTarget* target);
void render();
};