Game Engine 2D Platformer
|
ScoreDisplayComponent class used to show a GameEntity's score. More...
#include <ScoreDisplayComponent.hpp>
Public Member Functions | |
ScoreDisplayComponent (SDL_Renderer *ren) | |
Constuctor for ScoreDisplayComponent. More... | |
~ScoreDisplayComponent () | |
Destructor for ScoreDisplayComponent. More... | |
void | StartUp () |
Initializes the attributes for ScoreDisplayComponent. More... | |
void | ShutDown () |
Destroys and frees attributes for ScoreDisplayComponent. More... | |
void | Update (GameEntity &entity) |
Updates the ScoreDisplayComponent. More... | |
void | Render (GameEntity &entity) |
Renders the ScoreDisplayComponent. More... | |
Public Member Functions inherited from Component | |
Component ()=default | |
Constuctor for Component class. More... | |
virtual void | LoadImage (std::string filepath, SDL_Renderer *ren) |
To initalize loadImages for children classes. More... | |
virtual void | HandleEvent (GameEntity &entity) |
Handle the events of GameEntity object for children classes. More... | |
Public Attributes | |
SDL_Rect | rect1 |
SDL_Rect | rect2 |
SDL_Rect | backgroundRect |
ScoreDisplayComponent class used to show a GameEntity's score.
ScoreDisplayComponent::ScoreDisplayComponent | ( | SDL_Renderer * | ren | ) |
Constuctor for ScoreDisplayComponent.
ScoreDisplayComponent::~ScoreDisplayComponent | ( | ) |
Destructor for ScoreDisplayComponent.
|
virtual |
Renders the ScoreDisplayComponent.
Updates score display depending on GameEntity's score.
entity | GameEntity Object |
GameEntity | &entity |
Reimplemented from Component.
|
virtual |
Destroys and frees attributes for ScoreDisplayComponent.
Reimplemented from Component.
|
virtual |
Initializes the attributes for ScoreDisplayComponent.
Reimplemented from Component.
|
virtual |
Updates the ScoreDisplayComponent.
Renders score to screen.
entity | GameEntity Object |
GameEntity | &entity |
Implements Component.
SDL_Rect ScoreDisplayComponent::backgroundRect |
SDL_Rect ScoreDisplayComponent::rect1 |
SDL_Rect ScoreDisplayComponent::rect2 |