-
Notifications
You must be signed in to change notification settings - Fork 0
/
Room.h
65 lines (60 loc) · 1.63 KB
/
Room.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef ROOM_H
#define ROOM_H
#include "main.h"
#include <string>
#include <iostream>
#include <map>
#include "Element.h"
#include <vector>
#include <algorithm>
#include "Door.h"
#include "Bunny.h"
#include "Item.h"
#include "Shot.h"
#include "Pickup.h"
#include "Enemy.h"
#include "ItemFactory.h"
#include "PickupFactory.h"
#include "Portal.h"
#include "Bomb.h"
class Room : public RoomEffect
{
public:
Room(Bunny* bunny, SpaceItem* spaceItem, RoomType type, ItemFactory* ifactory, PickupFactory* pfactory);
~Room();
void collectElements();
void dispatchEvent(ALLEGRO_EVENT* event);
void findCollisions();
void onBombExplosion(Bomb* bomb);
void createDoor(Room* that, Side side);
void insert(Item* item);
void insert(Pickup* pickup);
void newPickup(PickupType type);
void newPickup();
void insert(Enemy* enemy);
void leave();
void enter();
void draw();
void oneRoomEffect(Effect effect, double change);
int bunnyAtDoor_;
map<int, Room*> rooms_;
RoomType type_;
double oneRoomEffect_[4];
protected:
int borders_[4];
Bunny* bunny_;
ALLEGRO_BITMAP *itempics_, *pickuppics_, *numbers_;
vector<Element*> elements_;
vector<Door*> doors_;
vector<Item*> items_;
vector<Shot*> shots_;
vector<Pickup*> pickups_;
vector<Enemy*> enemies_;
vector<Portal*> portals_;
vector<Bomb*> bombs_;
ItemFactory* ifactory_;
PickupFactory* pfactory_;
SpaceItem* spaceItem_;
private:
};
#endif // ROOM_H