Consertado "efeito metralhadora" que aparece num F7-spam
[Projeto-PCG.git] / weapon.h
blob64143263e7e6f132a096bfe2eaa8909d0c896017
1 #ifndef WEAPON_H
2 #define WEAPON_H
4 #include <string>
5 #include "geometry.h"
6 #include "thing.h"
7 #include "luaenv.h"
9 class Game;
10 class Shooter;
12 class Weapon {
13 private:
14 Ponto leftHand;
15 Ponto rightHand;
16 Ponto tip;
17 lua_State* lstate;
18 public:
19 Ponto position; //POSICAO USADA SOMENTE QUANDO ATIRADA, NAO USAR PARA OUTRAS COISAS
20 Shooter* firedBy; //MESMA COISA
21 Game *game;
22 Weapon (Game* g,lua_State* l) {game = g; lstate = l;}
23 Polygon sprite;
24 int fireRate;
25 std::string name;
26 void setSprite(Polygon asprite) { sprite = asprite;}
27 void setLeftHand(Ponto hand) {leftHand = hand;}
28 void setRightHand(Ponto hand) {rightHand = hand;}
29 Ponto getLeftHand() {return leftHand;}
30 Ponto getRightHand(){return rightHand;}
31 void desenha();
32 void setTip(Ponto t) {tip = t;}
33 Ponto getTip() {return tip;}
34 void fire(Ponto place, double angle, Shooter *_firedBy);
38 #endif