-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroom.h
57 lines (49 loc) · 1.39 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
#ifndef ROOM_H
#define ROOM_H
class Door;
class Camera;
#include <stdlib.h>
#include <stdio.h>
#include <QOpenGLShaderProgram>
#include "tile.h"
#include "player.h"
#include "camera.h"
#include "tinyxml2.h"
#include "movable.h"
#include "door.h"
#include "lightsource.h";
class Room {
protected:
std::vector<Tile> tiles;
std::vector<Hitbox> collisions;
std::vector<Interactable2D*> pickups;
std::vector<Movable*> entities;
std::vector<LightSource*>* lights;
Player* player;
Door* boss;
Camera* camera;
Movable* boss2;
public :
Room(std::vector<LightSource*>* l);
~Room();
void CreateGeometry();
void Render(QOpenGLShaderProgram *program,QOpenGLTexture *text);
void ComputeHitboxes();
void ReadFile(std::vector<Rooms>* r,int index,std::string path, Player* p, Camera* c);
std::vector<Tile> GetTiles();
bool TriggerCheck(Interactable2D* other);
bool CollisionCheck(Hitbox h);
bool isThisRoom(int _x, int _y);
void setPosition(int _x, int _y);
void UpdateEntities();
void Turn(int index);
QVector2D getPos();
bool IsPointInCircle(QVector2D *pt, QVector2D *center, float rayon);
bool CheckColl(float rayon, float angle, QVector2D point);
void setPlayer(Player* _p);
void affectEnemiesInRange();
bool wallOnTheVector(QVector2D vect, QVector2D player,QVector2D ennemi);
private:
int x, y;
};
#endif // ROOM_H