-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTower.h
55 lines (51 loc) · 1.49 KB
/
Tower.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef TOWER_H
#define TOWER_H
#include "Enemy.h"
#include <math.h>
#include <cmath>
#include <allegro5/allegro_audio.h>
#include <allegro5/allegro_acodec.h>
class Tower
{
public:
/** Default constructor */
Tower();
Tower(std::vector<Enemy> *, int, int, ALLEGRO_SAMPLE*, std::string);
/** Access firerate
* \return The current value of firerate
*/
void Update();
double Getfirerate() { return firerate; }
/** Set firerate
* \param val New value to set
*/
double Setfirerate(int val) { firerate = val; }
/** Access *target
* \return The current value of *target
*/
//Enemy Gettarget() { return *target; }
/** Set *target
* \param val New value to set
*/
void Settarget(Enemy *val) { target = val; }
/** Access rotation
* \return The current value of rotation
*/
double Getrotation() { return rotation; }
/** Set rotation
* \param val New value to set
*/
void Setrotation(int val) { rotation = val; }
protected:
private:
double firerate; //!< Member variable "firerate"
Enemy *target = NULL; //!< Member variable "*target"
double rotation; //!< Member variable "rotation"
double cooldown = 0;
std::vector<Enemy>* enemies = NULL;
ALLEGRO_SAMPLE *shootsound;
ALLEGRO_COLOR color;
int x;
int y;
};
#endif // TOWER_H