-
Notifications
You must be signed in to change notification settings - Fork 0
/
cRoomMan.h
47 lines (38 loc) · 1.07 KB
/
cRoomMan.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
44
45
46
47
#include <vector>
#include <string>
#include "tinyxml\tinyxml.h"
#include "CTexture.h"
#include "cTimer.h"
//ìåíåäæåð êîìíàò
class cRoomMan
{
private:
int score;
cLabel *score_lab;
cTimer *timer;
string maxTime;
int max_min, max_sec;
string m_title;
bool m_game_end;//ôëàã êîíöà èãðû
protected:
vector<cTexture>items;
void LoadRoom(const char *fn);
public:
cRoomMan();
cRoomMan(const string title, const char *fn);
~cRoomMan();
virtual void Draw(const bool named);//ôëàã îïðåäåëÿåò: ãðóçèòü ëè èìåíà îáúåêòîâ â ñòåê
virtual void pickItem(const int hit);
void addScore(const int num);
void subScore(const int num);
int processTime();//3 ñîñòîÿíèÿ: 0 - ïîðÿäîê, 1 - âûèãðûø, 2 - ïðîèãðûø
void setMaxTime(string val1, string val2, const int min, const int sec);
string getMaxTime() { return maxTime; }
void setTimer(const bool pause);
bool getTimer();
int getMin() { return timer->getMin(); }
int getSec() { return timer->getSec(); }
string getTitle() { return m_title; }
bool getGameEnd() { return m_game_end; }
void setGameEnd(const bool b) { m_game_end = b; }
};