-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtower.h
46 lines (37 loc) · 1.04 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
#ifndef TOWER_H
#define TOWER_H
#include <QDebug>
#include <QPixmap>
#include "bullet.h"
#include "templatefortower.h"
#include "circle.h"
#include "cameracontroller.h"
#include "unit.h"
class Cell;
class Unit;
class Bullet;
class Tower
{
public:
Cell* cell;
float elapsedReloadTime;
TemplateForTower* templateForTower;
int player;
int capacity;
std::vector<Bullet*> bullets;
Vector2* centerGraphicCoord;
Circle* radiusDetectionCircle;
Circle* radiusFlyShellCircle;
public:
Tower(Cell *cell, TemplateForTower *templateForTower, int player);
~Tower();
void updateGraphicCoordinates(CameraController *cameraController);
bool recharge(float delta);
bool shotFireBall(CameraController *cameraController);
bool shoot(Unit *unit, CameraController *cameraController);
void moveAllShells(float delta, CameraController *cameraController);
void moveShell(float delta, Bullet *bullet, CameraController *cameraController);
QString toString();
QString toString(bool full);
};
#endif // TOWER_H