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

Statically positioned bar that tracks a Pawn's health. More...

#include <HUD.hpp>

Inheritance diagram for gui::HealthBarStatic:
Inheritance graph
Collaboration diagram for gui::HealthBarStatic:
Collaboration graph

Public Member Functions

 HealthBarStatic (std::shared_ptr< Pawn > const &pawnToTrack, sf::Texture *texture, sf::Vector2f const &position, sf::Vector2f const &size)
 
virtual void update (float deltaSeconds) override
 
- Public Member Functions inherited from gui::HudItem
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 ()
 

Protected Attributes

sf::RectangleShape mBar
 Rectangle to represent health.
 
std::weak_ptr< PawnmTracked
 The pawn whose health we're tracking.
 
const float M_MAX_HEALTH
 The amount of health the pawn has when the healthbar was constructed. mBar is scales according to this.
 

Detailed Description

Statically positioned bar that tracks a Pawn's health.


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