The LARC Game Engine
A Simple Game Engine from the Laboratory for Recreational Computing
Static Protected Attributes | List of all members
CComponent Class Reference

The component accessor. More...

#include <Component.h>

Inheritance diagram for CComponent:
CAudio CParticleEngine< PARTICLE, PARTICLEDESC, VECTOR > CParticleEngine< CParticle2D, CParticleDesc2D, Vector2 > CParticleEngine< CParticle3D, CParticleDesc3D, Vector3 > CRandom CRenderer3D CSprite CParticleEngine2D CParticleEngine3D CSpriteRenderer

Static Protected Attributes

static CStepTimerm_pStepTimer = &cStepTimer
 Pointer to a step timer. More...
 
static CRandomm_pRandom = &cRandom
 Pointer to a PRNG. More...
 
static CKeyboardm_pKeyboard = &cKeyboard
 Pointer to a keyboard handler. More...
 
static CXBoxControllerm_pController = &cController
 Pointer to a XBox controller. More...
 
static CAudiom_pAudio = &cAudio
 Pointer to an audio player. More...
 

Detailed Description

This singleton class encapsulates the components commonly needed to create a game: A timer, a PRNG, an audio player, a keyboard handler, and a controller handler. Classes that need these pointers simply need to be derived from CComponent.

Member Data Documentation

◆ m_pAudio

CAudio * CComponent::m_pAudio = &cAudio
staticprotected

Sound player.

◆ m_pController

CXBoxController * CComponent::m_pController = &cController
staticprotected

Controller handler.

◆ m_pKeyboard

CKeyboard * CComponent::m_pKeyboard = &cKeyboard
staticprotected

Keyboard handler.

◆ m_pRandom

CRandom * CComponent::m_pRandom = &cRandom
staticprotected

PRNG.

◆ m_pStepTimer

CStepTimer * CComponent::m_pStepTimer = &cStepTimer
staticprotected

Timer pointer.