-
Notifications
You must be signed in to change notification settings - Fork 0
/
castle.h
47 lines (42 loc) · 851 Bytes
/
castle.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
#ifndef CASTLE_H
#define CASTLE_H
#include <QGraphicsPixmapItem>
#include "healthbar.h"
class Castle : public QGraphicsPixmapItem
{
private:
int currHealth;
int maxHealth;
int x;
int y;
HealthBar* healthBar;
bool isShielded;
bool finished;
int row;
int col;
public:
Castle(int,int);
// health functions
int getCurrHealth();
void setCurrHealth(int);
bool isCurrHealthMax();
void shield();
void removeShield();
// getters
int getX();
int getY();
bool getIsShielded();
// setters
void setX(int);
void setY(int);
void setIsShielded(bool);
int getRow() const;
int getCol() const;
void setRow(int);
void setCol(int);
public slots:
void decrementCurrHealth(int);
void incrementCurrHealth(int);
void move();
};
#endif // CASTLE_H