Top-down Shooter With Death
A Top-Down Shooter in Which Characters Die
Static Protected Attributes | List of all members
CCommon Class Reference

The common variables class. More...

#include <Common.h>

Inheritance diagram for CCommon:
CGame CObject CObjectManager CBullet CPlayer CTurret

Static Protected Attributes

static LSpriteRenderer * m_pRenderer = nullptr
 Pointer to renderer.
 
static CObjectManagerm_pObjectManager = nullptr
 Pointer to object manager.
 
static LParticleEngine2D * m_pParticleEngine = nullptr
 Pointer to particle engine.
 
static bool m_bGodMode = false
 God mode flag.
 
static Vector2 m_vWorldSize = Vector2::Zero
 World height and width.
 
static CPlayerm_pPlayer = nullptr
 Pointer to player character.
 

Detailed Description

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.