Space Sheep Xtreme Turbo Penguin Edition
Vaisseau.h
Aller à la documentation de ce fichier.
1 #ifndef VAISSEAU_H
2 #define VAISSEAU_H
3 
11 #include <SFML/Window.hpp>
12 #include "MovableElement.h"
13 #include "Tir.h"
14 #include <vector>
15 
16 class GameModel;
17 class TypeTir;
18 
26 class Vaisseau: public MovableElement
27 {
28  private:
29  int my_hp;
30  int my_pvMax;
31  bool my_isAlive;
32 
33  Vaisseau();
34 
35  protected:
37  sf::Clock my_clock;
40  public:
41 
49  Vaisseau(int hp, TypeTir* type, float shootingSpeed);
50 
54  virtual ~Vaisseau();
55 
56 
57 //Accesseurs
58 
66  int getHP() const;
67 
75  int getMaxHP() const;
76 
84  TypeTir* getTypeTir() const;
85 
93  bool getAlive() const;
94 
102  float getShootingSpeed() const;
103 
111  sf::Clock* getClock();
112 
113 
119  void setHP(int i);
120 
126  void setTypeTir(TypeTir* type);
127 
133  void setAlive(bool b);
134 
135 
136 //Méthodes
137 
142  virtual void shoot(GameModel* model) = 0;
143 
150  virtual std::vector<Tir*>::iterator isShot(GameModel* model) const = 0;
151 };
152 
153 #endif