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
11class AssetManager;
13class TextureManager;
14class SoundManager;
15
16class Game
17{
18public:
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
42private:
43 void setWinner(Entity::TeamLabel winningTeam);
44
45 int counter = 0;
46 bool isRunning = false;
47 SDL_Window* window;
48 Entity::TeamLabel winner;
49};
Definition AssetManager.h:20
Definition CollisionHandler.h:31
TeamLabel
Allows grouping entities by team association for hits, win conditions, etc.
Definition Entity.h:54
Definition Game.h:17
Definition SoundManager.h:16
Definition TextureManager.h:10