-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCore.hpp
More file actions
41 lines (38 loc) · 872 Bytes
/
Core.hpp
File metadata and controls
41 lines (38 loc) · 872 Bytes
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
#pragma once
#include "SFML/Graphics.hpp"
#include "ResourceHolder.hpp"
#include "Game.hpp"
#include "GameOnline.hpp"
#include "RenderManager.hpp"
#include "Menu.hpp"
//#include "MySocket.hpp"
#include "SocketManager.hpp"
namespace rpf {
enum Mode {
MAIN_MENU, CONNECTION_MENU, SINGLE_GAME, MULTI_GAME, GAME_OVER, GAME_OVER_MUL, CLOSED
};
class Core {
public:
static Core* CORE;
static GameOnline* GAME;
static SocketManager* sock;
static int highest_score;
Core();
~Core() = default;
void Run();
void switchMode(Mode mode);
void switchMode(Render* obj);
void switchModeAsync(Mode mode);
std::vector<int> joined, leaved;
std::vector<std::pair<int, float>> results;
private:
sf::RenderWindow window;
RenderManager rm;
ResourceHolder rh;
Render* now;
Mode mode;
bool wait_switch = false;
Mode wait_mode;
void update();
};
}