Box2D Cannon Game With Stars
Game Physics with a 2D Physics Engine
Loading...
Searching...
No Matches
CHeadsUpDisplay Class Reference

The heads-up display. More...

#include <Hud.h>

Inheritance diagram for CHeadsUpDisplay:
Collaboration diagram for CHeadsUpDisplay:

Public Member Functions

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

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 CBox2DRenderer * m_pRenderer = nullptr
 Pointer to Render World.
 
static CObjectManagerm_pObjectManager = nullptr
 Pointer to object manager.

 
static Sage::CParticleEngine2D * m_pParticleEngine = nullptr
 Pointer to particle engine.
 
static eDrawMode m_eDrawMode = eDrawMode::Sprites
 Draw mode.
 
static bool m_bEasterEgg = false
 Easter egg!
 

Detailed Description

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 the temperature guage and clock.

Parameters
secsNumber of seconds to display on clock.
tTemperature to display on thermometer.
mtMaximimum temperature that thermometer can display.
Here is the caller graph for this function:

◆ Initialize()

void CHeadsUpDisplay::Initialize ( )

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

Here is the caller graph for this function: