![]() |
The Blank Game
A Blank 2D Game with Sound and Graphics
|
The common variables class. More...
#include <Common.h>
Static Protected Attributes | |
static LSpriteRenderer * | m_pRenderer = nullptr |
Pointer to renderer. | |
static CObjectManager * | m_pObjectManager = nullptr |
Pointer to object manager. | |
CCommon is a singleton class that encapsulates things that are common to different game components, including game state variables. Making it a singleton class means that we can avoid passing its member variables around as parameters, which makes the code minisculely faster, and more importantly, makes the code more readable by reducing function clutter.