Dmitrijs Griskovs / Mbed 2 deprecated el17dg

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Hud Class Reference

Hud Class Reference

Hud Class. More...

#include <hud.h>

Public Member Functions

 Hud ()
 Constructor.
void resetRedLed ()
 Resets red LED state and counter.
void drawScore ()
 Draws an in-game score on the screen during the gameplay.
void drawHighScore ()
 Displays in the main menu the highest score reached.
void displayLifes ()
 Display life counter using LEDs.

Detailed Description

Hud Class.

Renders interface elemets such as score and lifes

Author:
Dmitrijs Griskovs
Date:
15/04/2019

Definition at line 10 of file hud.h.


Constructor & Destructor Documentation

Hud (  )

Constructor.

calls for the reset of red LED.

Definition at line 17 of file hud.h.


Member Function Documentation

void displayLifes (  )

Display life counter using LEDs.

Checks the palyer's life value and lights the LEDs on/off accordingly to how many lifes are left. green = 3, yellow = 2 and red = 1.

Definition at line 44 of file hud.h.

void drawHighScore (  )

Displays in the main menu the highest score reached.

Definition at line 33 of file hud.h.

void drawScore (  )

Draws an in-game score on the screen during the gameplay.

Definition at line 26 of file hud.h.

void resetRedLed (  )

Resets red LED state and counter.

Definition at line 20 of file hud.h.