-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtile.h
More file actions
46 lines (32 loc) · 659 Bytes
/
tile.h
File metadata and controls
46 lines (32 loc) · 659 Bytes
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 TILE_H
#define TILE_H
#include <QObject>
class Tile : public QObject
{
Q_OBJECT
Q_PROPERTY(Type type READ type() WRITE setType() NOTIFY typeChanged())
Q_ENUMS(Type)
public:
enum Type {
Grass = 0,
Floor,
Wall,
Stone,
Debris,
Invalid = -1
};
explicit Tile(QObject *parent, Type type);
Tile() : m_type(Invalid) {}
Type type() const;
void setType(const Type type);
bool isWalkable() const;
void explode();
signals:
void typeChanged();
void exploded();
public slots:
private:
Tile(const Tile &other);
Type m_type;
};
#endif // TILE_H