#ifndef PERSO_H #define PERSO_H // Base #include #include // Affichage #include "../Structures/SDL_rotozoom.h" #include "../Structures/Affichable.h" #include "DisplayHP.h" // Mouvement #include "../Structures/Vecteur.h" #include "../Control/Controler.h" // Tirs #include "../Tirs/Tirs_Gest.h" #include "../Armes/Armes_Gest.h" class Perso : public Affichable { /// Fonctions - - - public: Perso(SDL_Surface* srcImg, SDL_Surface* deathImg, Controler* ctrl, Tirs_Gest* tirsGest, bool allie, Armes_Gest* armGest); Perso(SDL_Surface* srcImg, SDL_Surface* deathImg, Controler* ctrl, Tirs_Gest* tirsGest, bool allie, Armes_Gest* armGest, float x, float y); virtual ~Perso(); void bouger(); bool estVivant() const; Vec getPos() const; Vec getVisee() const; void regen(); void virtual afficher(const Vec &lookAt, SDL_Surface* screen); protected: void majFullImg(); /// Attributs - - - protected: // Vie int m_vieMax; int m_vie; DisplayHP m_disHP; // Physique float m_vitesse; bool m_vivant; const bool m_allie; // Surfaces SDL_Surface* m_srcImg; SDL_Surface* m_deathImg; SDL_Surface* m_fullImg; // Visée Vec m_visee; Vec m_ortho; Controler* m_ctrl; // Pour encaisser Tirs_Gest* m_tirsGest; // Pour tirer Armes_Gest* m_armGest; Arme* m_arme[2]; }; #endif // PERSO_H