-
Notifications
You must be signed in to change notification settings - Fork 0
GameManager
The GameManager class is the core class of the engine: it controls the main execution loop, handles file loading, input reading, and command execution. Apart from this, it has some methods for game-level manipulation, apart from methods for accessing the various areas that compose a game.
The interface for this class is:
-
static GameManager* getInstance()
: returns the unique instance of the GameManager, implemented with the Singleton pattern. -
void erase()
: clears ALL the game objects. -
void loadXML(const std::string& filename)
: loads a certain game file into the proper game objects. -
void startGame()
: starts the game main loop. -
Area* getArea(std::string name)
: returns the Area item with the given name. -
void setEndGame(bool end)
: sets the end game internal value to the given value. -
const std::string& getCurrentLocation()
: gets the player's current location.