DisplayHP.h 628 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef DISPLAYHP_H
  2. #define DISPLAYHP_H
  3. #include "../Structures/Affichable.h"
  4. #define BARRE_EPAIS 5
  5. class DisplayHP : public Affichable
  6. {
  7. /// Méthodes
  8. public:
  9. DisplayHP( int vieMax, Uint32 front = 0x00940C, Uint32 back = 0x2E0000, Vec up = Vec(0.0f, 48.0f) );
  10. virtual ~DisplayHP();
  11. void updateImg( const int &vie );
  12. void IAmHere( const Vec &pos );
  13. void setMax( int max );
  14. protected:
  15. void cadrer();
  16. /// Attributs
  17. protected:
  18. int m_vieMax;
  19. Uint32 m_front;
  20. Uint32 m_back;
  21. Vec m_up;
  22. SDL_Rect m_vie;
  23. };
  24. #endif // DISPLAYHP_H