File: gamemgr.h

package info (click to toggle)
angelscript 2.35.1%2Bds-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,388 kB
  • sloc: cpp: 71,969; asm: 1,558; makefile: 665; xml: 214; javascript: 42; ansic: 22; python: 22; sh: 7
file content (39 lines) | stat: -rw-r--r-- 609 bytes parent folder | download | duplicates (2)
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