4 #include <SFML/Graphics.hpp>
5 #include <SFML/Audio.hpp>
6 #include "../include/projeteis.hpp"
14 Heroi(
int vida,
const string& heroiFile,
const Font& fonte);
15 virtual Sprite getSprite()
const;
16 void definirPosicao(
const Vector2f& posicao);
18 void atirar(
const Vector2f& direcao);
19 void atualizarProjeteis(
float deltaTime);
21 void setVida(
int novaVida);
23 virtual void RecuperarVida();
24 void RecuperarMunicao();
27 Vector2f getPosicao();
28 virtual bool verificarColisao(
const Sprite& sprite);
29 virtual bool verificarColisaoDrop(
const Sprite& sprite);
30 virtual void renderizar(RenderWindow& window);
31 vector<Projetil>& getProjeteis();
33 int getRandomQuantidadeProjetil();
38 string bulletSongFile =
"assets/music/bulletsong.ogg";
40 SoundBuffer bufferBulletSong;
41 Texture texturaProjetil;
43 vector<Projetil> projeteis;
44 Texture background_heroi;
45 Sprite backgroundSprite_heroi;
52 Sprite backgroundSprite_projetil;
53 Texture background_projetil;
55 int quantidadeProjetil = 30;
59 float velocidade = 300.0f;
62 IntRect barra1 = IntRect(0, 0, 236, 20);
63 IntRect barra2 = IntRect(23.6, 0, 236, 20);
64 IntRect barra3 = IntRect(47.2, 0, 236, 20);
65 IntRect barra4 = IntRect(70.8, 0, 236, 20);
66 IntRect barra5 = IntRect(94.4, 0, 236, 20);
67 IntRect barra6 = IntRect(118, 0, 236, 20);
68 IntRect barra7 = IntRect(141.6, 0, 236, 20);
69 IntRect barra8 = IntRect(165.2, 0, 236, 20);
70 IntRect barra9 = IntRect(188.8, 0, 236, 20);
71 IntRect barra10 = IntRect(212.4, 0, 236, 20);
72 vector<IntRect> barrasVida = {barra1, barra2, barra3, barra4, barra5, barra6, barra7, barra8, barra9, barra10};
Text textoVida
Definition: heroi.hpp:60
int vida
Definition: heroi.hpp:58
Texture barraVida
Definition: heroi.hpp:73
Sprite barraSprite
Definition: heroi.hpp:74
Definition: projeteis.hpp:10