VEGO-Engine
0.1
Loading...
Searching...
No Matches
Game.h
1
#pragma once
2
3
#include <SDL.h>
4
#include <SDL_image.h>
5
#include <SDL_mixer.h>
6
#include <vector>
7
8
#include "Vector2D.h"
9
#include "Entity.h"
10
11
class
AssetManager
;
12
class
CollisionHandler
;
13
class
TextureManager
;
14
class
SoundManager
;
15
16
class
Game
17
{
18
public
:
19
Game
();
20
~Game
();
21
22
void
init(
const
char
* title,
int
xpos,
int
ypos,
int
width,
int
height,
bool
fullscreen);
23
void
selectCharacters(
const
char
* &playerSprite,
const
char
* &enemySprite);
24
25
void
handleEvents();
26
void
update();
27
void
render();
28
void
clean();
29
bool
running()
const
;
30
31
static
void
addTile(
unsigned
long
id
,
int
x,
int
y);
32
static
SDL_Renderer* renderer;
33
static
SDL_Event event;
34
static
CollisionHandler
* collisionHandler;
35
static
AssetManager
* assets;
36
static
TextureManager
* textureManager;
37
static
SoundManager
* soundManager;
38
39
void
refreshPlayers();
40
Entity::TeamLabel
getWinner()
const
;
41
42
private
:
43
void
setWinner(
Entity::TeamLabel
winningTeam);
44
45
int
counter = 0;
46
bool
isRunning =
false
;
47
SDL_Window* window;
48
Entity::TeamLabel
winner;
49
};
AssetManager
Definition
AssetManager.h:20
CollisionHandler
Definition
CollisionHandler.h:31
Entity::TeamLabel
TeamLabel
Allows grouping entities by team association for hits, win conditions, etc.
Definition
Entity.h:54
Game
Definition
Game.h:17
SoundManager
Definition
SoundManager.h:16
TextureManager
Definition
TextureManager.h:10
include
Game.h
Generated by
1.11.0