/
LD48.hpp
43 lines (39 loc) · 974 Bytes
/
LD48.hpp
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 MYGAME_H
#define MYGAME_H
#include "Game.hpp"
#include "Player.hpp"
#include "Board.hpp"
#include "Ui.hpp"
class Object;
class Player;
class LD48 : public Game {
public:
LD48(int scrwidth, int scrheight, std::string title, int style);
~LD48();
void init(int nPlayer);
void update(float deltaTime);
void draw();
void processEvents();
void keyPressed(sf::Event event);
void keyReleased(sf::Event event);
void setState(state s);
void setMaxPoints(int p);
int getNplayer();
dir getDirection(int id);
Board* getBoard();
Player* getPlayer(int id);
sf::RenderWindow* getWindow();
void addObject(Object* obj);
void spawnCollectible(collectible type);
void spawnRandomCollectible();
private:
state gameState;
Ui ui;
Board board;
std::list<Object*> objects;
std::vector<std::vector<dir>> isKeyPressed;
int nPlayers;
int maxPoints;
float spawnTimer;
};
#endif // MYGAME_H