![]() |
FYP
1.0.0
Final Year Project -- Alexander Meuer
|
Healthbar that follows a Pawn's position. More...
#include <HUD.hpp>


Public Member Functions | |
| HealthBar (std::shared_ptr< Pawn > const &pawnToTrack, sf::Texture *texture, sf::Vector2f const &offset, sf::Vector2f const &size) | |
| void | update (float deltaSeconds) override |
Public Member Functions inherited from gui::HealthBarStatic | |
| HealthBarStatic (std::shared_ptr< Pawn > const &pawnToTrack, sf::Texture *texture, sf::Vector2f const &position, sf::Vector2f const &size) | |
Public Member Functions inherited from gui::HudItem | |
| bool | isFlaggedForRemoval () const |
Private Attributes | |
| const sf::Vector2f | M_OFFSET |
| Displacement from pawn at which to draw the healthbar. | |
Additional Inherited Members | |
Protected Member Functions inherited from gui::HealthBarStatic | |
| void | draw (sf::RenderTarget &target, sf::RenderStates states) const override |
Protected Member Functions inherited from gui::HudItem | |
| void | flagForRemoval () |
Protected Attributes inherited from gui::HealthBarStatic | |
| sf::RectangleShape | mBar |
| Rectangle to represent health. | |
| std::weak_ptr< Pawn > | mTracked |
| 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. | |
Healthbar that follows a Pawn's position.