|
|
static std::unique_ptr< CTimer > | m_pTimer = std::make_unique<CTimer>() |
| | Pointer to a timer.
|
| |
|
static std::unique_ptr< CRandom > | m_pRandom = std::make_unique<CRandom>() |
| | Pointer to a PRNG.
|
| |
|
static std::unique_ptr< CSound > | m_pSound = std::make_unique<CSound>() |
| | Pointer to sound manager.
|
| |
| static std::unique_ptr< CKeyboard > | m_pKeyboard |
| | Pointer to a keyboard handler.
|
| |
|
static std::unique_ptr< CMouse > | m_pMouse = std::make_unique<CMouse>() |
| | Pointer to a mouse handler.
|
| |
| static std::unique_ptr< CController > | m_pController |
| | Pointer to a controller.
|
| |
This singleton class encapsulates the components commonly needed to create a game: A timer, a PRNG, a keyboard handler, and a controller handler. Classes that need these pointers simply need to be derived from CComponent.