-
Notifications
You must be signed in to change notification settings - Fork 7
/
MGR.h
130 lines (122 loc) · 3.11 KB
/
MGR.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#pragma once
#include <vector>
#include "OBJ.h"
#include "shader.h"
#include "Player.h"
#include "ParticleSystem.h"
class MGR
{
public:
MGR() {};
virtual ~MGR() {};
virtual void DrawAll(Shader &shader) = 0;
virtual void DetectCollisionALL(MovableOBJ &mobj) = 0;
virtual void DetectCollisionALL(Player &player) = 0;
virtual void ShowInfo() = 0;
};
class SceneMGR : public MGR {
public:
SceneMGR();
void DrawAll(Shader &shader);
void DetectCollisionALL(MovableOBJ &obj);
void DetectCollisionALL(Player &player);
void ShowInfo();
std::vector<OBJ> objects;
private:
std::vector<OBJ>::iterator it;
};
class NPCMGR : public MGR {
public:
NPCMGR();
void DrawAll(Shader &shader);
void DetectCollisionALL(MovableOBJ &mobj);
void DetectCollisionBullet(Bullet &bullet);
void DetectCollisionALL(Player &player);
void DetectCollisionALL(SceneMGR &sceneMgr);
void DetectCollisionIn();
//todo: collide with itself
void UpdateAll(float deltaTime);
void ShowInfo();
std::vector<NPC> objects;
void setBlood(ParticleSystem* Blood);
private:
std::vector<NPC>::iterator it;
Model patrick[9];
int frames;
int expNum;
ParticleSystem* Blood;
};
class BulletMGR : public MGR {
public:
BulletMGR();
void DrawAll(Shader &shader);
void CreateNewBullet(glm::vec3 &loc, glm::vec3 &front, float speed, glm::vec3 &up, double yaw, double pitch);
void DetectCollisionALL(NPCMGR &npc);
void DetectCollisionALL(MovableOBJ &mobj) {};
void DetectCollisionALL(Player &player) {};
void UpdateAll();
std::vector<Bullet> objects;
Model bulletModel;
void ShowInfo();
void setBlood(ParticleSystem* Blood);
private:
ParticleSystem* Blood;
std::vector<Bullet>::iterator it;
};
//class MGR
//{
//public:
// MGR() {};
// virtual ~MGR() {};
// virtual void DrawAll(Shader &shader) = 0;
// virtual void DetectCollisionALL(MovableOBJ &mobj) = 0;
// virtual void DetectCollisionALL(Player &player) = 0;
// virtual void ShowInfo() = 0;
//};
//
//class SceneMRG : public MGR {
//public:
// SceneMRG() {};
// void DrawAll(Shader &shader);
// void DetectCollisionALL(MovableOBJ &obj);
// void DetectCollisionALL(Player &player);
// void ShowInfo();
// std::vector<OBJ> objects;
//private:
// std::vector<OBJ>::iterator it;
//};
//
//class NPCMGR : public MGR {
//public:
// NPCMGR();
// void DrawAll(Shader &shader);
// void DetectCollisionALL(MovableOBJ &mobj);
// void DetectCollisionBullet(Bullet &bullet);
// void DetectCollisionALL(Player &player);
// void DetectCollisionIn();
// //todo: collide with itself
// void UpdateAll(float deltaTime);
// void ShowInfo();
// std::vector<NPC> objects;
//private:
// std::vector<NPC>::iterator it;
// Model patrick[9];
// int frames;
// int expNum;
//};
//
//class BulletMGR : public MGR {
//public:
// BulletMGR();
// void DrawAll(Shader &shader);
// void CreateNewBullet(glm::vec3 &loc, glm::vec3 &front, float speed, glm::vec3 &up, double yaw, double pitch);
// void DetectCollisionALL(NPCMGR &npc);
// void DetectCollisionALL(MovableOBJ &mobj) {};
// void DetectCollisionALL(Player &player) {};
// void UpdateAll();
// std::vector<Bullet> objects;
// Model bulletModel;
// void ShowInfo();
//private:
// std::vector<Bullet>::iterator it;
//};