![]() |
Ball and Spring Toy
Game Physics with Bespoke Code
|
The common variables class. More...
#include <Common.h>


Static Protected Attributes | |
| static Sage::CSpriteRenderer * | m_pRenderer = nullptr |
| Pointer to the renderer. | |
| static CObjectManager * | m_pObjectManager = nullptr |
| Pointer to the object manager. | |
| static eBody | m_eCurrentBody = (eBody)0 |
| Current body type. | |
CCommon is a monostate class that encapsulates things that are common to different game components, including game state variables. Making it a monostate 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.