FYP  1.0.0
Final Year Project -- Alexander Meuer
gui::LifeTracker Class Reference

Draws a line of images, one for each life (or whatever other int it may be told to track). More...

#include <HUD.hpp>

Inheritance diagram for gui::LifeTracker:
Inheritance graph
Collaboration diagram for gui::LifeTracker:
Collaboration graph

Public Member Functions

 LifeTracker (std::shared_ptr< int > lives, sf::Texture &texture, sf::Vector2f const &position, sf::Vector2f const &scale={1.f, 1.f}, sf::Vector2f const &spacing={0.f, 0.f})
 
- Public Member Functions inherited from gui::HudItem
virtual void update (float deltaSeconds)
 
bool isFlaggedForRemoval () const
 

Protected Member Functions

void draw (sf::RenderTarget &target, sf::RenderStates states) const override
 
- Protected Member Functions inherited from gui::HudItem
void flagForRemoval ()
 

Private Attributes

sf::Sprite mSprite
 
const sf::Vector2f M_SPACING
 Space between lives on screen. Does not account for width of mSprite.
 
std::shared_ptr< int > mLives
 Shared pointer to an int. We'll draw this many lives on the screen.
 

Detailed Description

Draws a line of images, one for each life (or whatever other int it may be told to track).


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