-
Notifications
You must be signed in to change notification settings - Fork 1
/
door.h
46 lines (29 loc) · 1.09 KB
/
door.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 __DOOR_H__
#define __DOOR_H__
#include "point.h"
#include "entity.h"
class Door : public Entity
{
public:
Door(); // Default Constructor
Door( string, Point,
int, int, double, Point); // Constructor with parameters.
~Door(); // Deconstructor
virtual void onAlways(); // Opens or closes the door depending on opening bool
void open(); // Opens the door.
void close(); // Closes the door.
void draw(); // Renders the door in the window
void setPos( Point ); // Sets the position of the door.
private:
double openSpeed;
double closeSpeed;
Point openLoc;
Point closeLoc;
Direction dir;
bool opening;
string img;
int frameOpened;
ResourceMgr* resourceMgr;
Window* window;
};
#endif __DOOR_H__