Jamie Slowgrove - PGG Assignment 2
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Private Attributes | List of all members
GameUI Class Reference

A class for the 2D GameUI that inherits UI. More...

#include <GameUI.h>

Inheritance diagram for GameUI:
Inheritance graph
Collaboration diagram for GameUI:
Collaboration graph

Public Member Functions

 GameUI (std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader * > &shaders, float scoreValue, float heightValue)
 
 GameUI (std::unordered_map< std::string, Shader * > &shaders, float scoreValue, float heightValue)
 
 ~GameUI ()
 
void update (float dt)
 
void draw ()
 
void updateValues (float scoreValue, float heightValue)
 
- Public Member Functions inherited from UI
 UI (std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader * > &shaders)
 
 UI (std::unordered_map< std::string, Shader * > &shaders)
 
 ~UI ()
 

Private Attributes

UIObjectscore
 
UIObjectheight
 
UIObjecthelpInfo
 
UIObjectscoreText
 
UIObjectheightText
 
float scoreValue
 
float heightValue
 

Additional Inherited Members

- Protected Member Functions inherited from UI
void initialiseShaders (std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader * > &shaders)
 
- Protected Attributes inherited from UI
Shadershader
 

Detailed Description

A class for the 2D GameUI that inherits UI.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

GameUI::GameUI ( std::string  vertexShaderFileName,
std::string  fragmentShaderFileName,
std::unordered_map< std::string, Shader * > &  shaders,
float  scoreValue,
float  heightValue 
)

Constructs the GameUI object.

Parameters
vertexShaderFileNameThe name of the vertex shader file.
fragmentShaderFileNameThe name of the fragment shader file.
shadersA reference to the loaded Shader files
scoreValueThe score.
heightValueThe height.
GameUI::GameUI ( std::unordered_map< std::string, Shader * > &  shaders,
float  scoreValue,
float  heightValue 
)

Constructs the GameUI object.

Parameters
shadersA reference to the loaded Shader files.
scoreValueThe score.
heightValueThe height.
GameUI::~GameUI ( )

Destructs the GameUI object

Member Function Documentation

void GameUI::draw ( )
virtual

A function to draw to the screen.

Implements UI.

Here is the call graph for this function:

Here is the caller graph for this function:

void GameUI::update ( float  dt)
virtual

A function to update the GameUI.

Parameters
dtThe delta time.

Implements UI.

Here is the caller graph for this function:

void GameUI::updateValues ( float  scoreValue,
float  heightValue 
)

A function to update the score and height in the GameUI.

Parameters
scoreValueThe score.
heightValueThe height.

Here is the caller graph for this function:

Member Data Documentation

UIObject* GameUI::height
private

A UIObject for the height from the ground

UIObject* GameUI::heightText
private

A UIObject for the height text

float GameUI::heightValue
private

The height of the game

UIObject* GameUI::helpInfo
private

A UIObject for how to open the help screen or quit to menu

UIObject* GameUI::score
private

A UIObject for the score

UIObject* GameUI::scoreText
private

A UIObject for the score text

float GameUI::scoreValue
private

The score of the game


The documentation for this class was generated from the following files: