|
Platformer
Platformer
|
This class manages the loading, rendering, and objects of our game as a singleton. More...
#include <GameManager.hpp>

Public Member Functions | |
| void | init () |
| Initializes the GameManager. | |
| void | shutdown () |
| Shuts down the GameManager, removing its reference to the currently loaded GameWorld and all GameObjects contained within. | |
| void | LoadLevels () |
| Calls to parse the levels and sets shouldLoadLevel true. | |
| void | Update () |
| Updates the world and any other gameobjects controlled by the GameManager, and calls to load levels if prompted. | |
| GameManager (const GameManager &)=delete | |
| Stop the compiler from generating methods to copy the object. | |
| GameManager & | operator= (const GameManager &)=delete |
| Stop the compiler from generating methods to copy the object. | |
| void | RegisterObject (std::shared_ptr< GameObject > obj, bool isPermanent) |
Static Public Member Functions | |
| static GameManager & | instance () |
| The singleton instance of the GameManager. | |
| static void | LoadNextLevel () |
| Increments the curLevel and sets shouldLoadLevel true. | |
| static void | ReloadLevel () |
| Reloads the level by setting shouldLoadLevel true. | |
| static std::vector< std::shared_ptr< GameObject > > | GetActiveObjects () |
| Gets the list of all active objects in our GameManager. More... | |
Private Member Functions | |
| GameManager () | |
| Constructs a GameManager. | |
| ~GameManager () | |
| Destructs a GameManager. | |
| void | LoadLevel (const std::string &path) |
| Loads the given level path. More... | |
Private Attributes | |
| std::shared_ptr< GameWorld > | curWorld_ |
| The current world for our GameManager. | |
| std::vector< std::shared_ptr< GameObject > > | permanentObjs_ |
| The permanent objects in our GameManager. | |
| std::vector< std::string > | levelPaths |
| The list of level paths for loading assets. | |
| int | curLevel |
| The current level. | |
| bool | shouldLoadLevel |
| Whether or not the GameManager should load the next level. | |
This class manages the loading, rendering, and objects of our game as a singleton.
|
static |
Gets the list of all active objects in our GameManager.


|
private |
Loads the given level path.
| path | The path of the level to be loaded |


1.8.14