|
Pacman Torben Petré
|
#include <StateManager.h>
Public Member Functions | |
| GameContext (const std::shared_ptr< logic::Score > &scoreSystem, const std::shared_ptr< SoundManager > &soundManager, const unsigned int lives) | |
Public Attributes | |
| std::shared_ptr< logic::Score > | scoreSystem |
| std::shared_ptr< SoundManager > | soundManager |
| std::string | username |
| unsigned int | lives |
Struct used to hold constants throughout the states. This struct is owned by the StateManager and used by states to get access to its members. This way I can avoid recreating them, when one instance is enough. By giving ownership to the StateManager I can give it a simple getter, saving me from having to pass around a lot of arguments to different states.
|
inline |
| unsigned int GameContext::lives |
| std::shared_ptr<logic::Score> GameContext::scoreSystem |
| std::shared_ptr<SoundManager> GameContext::soundManager |
| std::string GameContext::username |