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
|
#ifndef GAMEMGR_H
#define GAMEMGR_H
#include <vector>
#include <string>
class CGameObj;
class CGameMgr
{
public:
CGameMgr();
~CGameMgr();
int StartGame();
void Run();
void EndGame(bool win);
CGameObj *GetGameObjAt(int x, int y);
bool GetActionState(int action);
CGameObj *FindGameObjByName(const std::string &name);
protected:
void Render();
void GetInput();
CGameObj *SpawnObject(const std::string &type, char dispChar, int x, int y);
std::vector<CGameObj*> gameObjects;
bool actionStates[4];
bool gameOn;
};
extern CGameMgr *gameMgr;
#endif
|