Box2D Cannon Game With Stars
Ian Parberry's "Introduction to Game Physics"
Public Member Functions | Private Attributes | List of all members
CHeadsUpDisplay Class Reference

The heads-up display. More...

#include <Hud.h>

Inheritance diagram for CHeadsUpDisplay:
CCommon

Public Member Functions

 ~CHeadsUpDisplay ()
 Destructor.
 
void draw (UINT, float, float)
 Draw HUD. More...
 
void Initialize ()
 Create HUD objects. More...
 

Private Attributes

std::vector< CObject * > m_stdList
 Object list.
 

Additional Inherited Members

- Static Protected Attributes inherited from CCommon
static b2World * m_pPhysicsWorld = nullptr
 Pointer to Box2D Physics World.
 
static CRendererm_pRenderer = nullptr
 Pointer to Render World.
 
static CObjectManagerm_pObjectManager = nullptr
 Pointer to object manager.

 
static LParticleEngine2D * m_pParticleEngine = nullptr
 Pointer to particle engine.
 
static bool m_bEasterEgg = false
 Easter egg!
 

Detailed Description

The heads-up display.

The HUD consists of a temperature guage and a clock, both of which are animated.

Member Function Documentation

◆ draw()

void CHeadsUpDisplay::draw ( UINT  secs,
float  t,
float  mt 
)

Draw HUD.

Draw the temperature guage and clock.

Parameters
secsNumber of seconds to display on clock.
tTemperature to display on thermometer.
mtMaximimum temperature that thermometer can display.

◆ Initialize()

void CHeadsUpDisplay::Initialize ( )

Create HUD objects.

Create the HUD objects and collect them in the object list.