-
Notifications
You must be signed in to change notification settings - Fork 0
/
portal.h
38 lines (35 loc) · 942 Bytes
/
portal.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
#ifndef PORTAL_H
#define PORTAL_H
#include <QGraphicsPixmapItem>
#include "room.h"
#include <QObject>
#include "board.h"
/** @class Portal
* @brief The Portal class is a class used to traverse between Room objects
*
* The Portal class publicly derives from the QObject and QGraphicsPixmapItem classes.
*/
class Portal : public QObject, public QGraphicsPixmapItem
{
Q_OBJECT
public:
/**
* @brief Portal constructor
* @param to is the Room object it starts from
* @param board is the Board object containg the Portal
*/
Portal(Room* to, Board* board);
/**
* @brief Portal destructor
*/
~Portal();
Room* to;
Board* board;
public slots:
/**
* @brief Collided is a custom public slot that detects whether the Player is interacting with it
* @param port is the Portal object being interacted with
*/
void Collided(QGraphicsItem* port);
};
#endif // PORTAL_H