-
Notifications
You must be signed in to change notification settings - Fork 1
/
Level.h
43 lines (35 loc) · 1.13 KB
/
Level.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
#ifndef LEVEL_H
#define LEVEL_H
#include "Maze/AbstractMazeGenerator.h"
#include "Maze/NormalMazeGenerator.h"
#include <memory>
#include "Misc/ImagePool.h"
#include "Misc/GameInfo.h"
#include "Characters/CollisionManager.h"
#include "Input/Input.h"
#include <functional>
#include <vector>
class Level : public Suscribable<Events::HeroAreDead, void(void)>,
public Suscribable<Events::ClearedLevel, void(void)>
{
public :
using HeroAreDead = Suscribable<Events::HeroAreDead, void(void)>;
using ClearedLevel = Suscribable<Events::ClearedLevel, void(void)>;
using Hero_type = std::unique_ptr<ICharacter>;
Level(const ImagePool&, Input::GameInput&, GameInfo&);
const Maze& getMaze() const;
std::vector<Hero_type> getCharacters();
const std::vector<Hero_type>& peekAtCharacters() const;
void update();
void ReAssignRoom(Direction d);
private :
std::unique_ptr<Maze> maze;
const ImagePool& pool;
CollisionManager* cm;
Input::GameInput& g_i;
//std::vector<Hero_type> heroes;
Registration hero_move, hero_shoot, assign_room, exit_level;
std::vector<std::function<void()>> callbacks;
GameInfo& stats;
};
#endif