-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathManager.h
96 lines (85 loc) · 3.3 KB
/
Manager.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
#pragma once
#include "Enemy.h"
#include "A.h"
#include "AB.h"
#include "C.h"
#include "D.h"
#include "BAK.h"
#include "Viktor.h"
#include "Moise.h"
#include "Player.h"
#include "HUD.h"
#include "Projectiles.h"
extern int height;
extern int width;
extern RenderWindow window;
class Manager
{
private:
bool level1_playing=false, level2_playing=false, level3_playing=false;
Vector2f playerVect = { 0,-1.f };
vector<int> enemyCount = { 0,0,0,0,0,0,0 };
vector<int> maxList = { 5,3,3,4,1,1,1 };
vector<HUD*> allHuds;
vector<Projectiles*> allProjectilesEnemy;
vector<Projectiles*> allProjectilesPlayer;
vector<Projectiles*> allProjectilesPlayer2;
vector<Projectiles*> allProjectilesLaser;
vector<vector<Projectiles*>*> allProjectiles = {&allProjectilesPlayer,&allProjectilesPlayer2,&allProjectilesEnemy,&allProjectilesLaser};
vector<Player*> allPlayers;
vector<Enemy*> allA = {};
vector<Enemy*> allAB = {};
vector<Enemy*> allC = {};
vector<Enemy*> allD = {};
vector<Enemy*> allBAK = {};
vector<Enemy*> allViktor = {};
vector<Enemy*> allMoise = {};
vector<vector<Enemy*>*> allEnemies = { &allA,&allAB ,&allC ,&allD ,&allBAK ,&allViktor ,&allMoise };
enum enemyIndex {
_A = 0,
_AB = 1,
_C = 2,
_D = 3,
_BAK = 4,
_Viktor = 5,
_Moise = 6
}; // this or that (either) : unordered_map... ( in the end both are used to show )
unordered_map<string, int> nameToIndex = { {"A", 0}, {"AB", 1}, {"C", 2}, {"D", 3},{"BAK", 4}, {"Viktor", 5}, {"Moise", 6} };
enemyIndex ENEMYINDEX;
public:
SoundBuffer metaphor_musicSB, pttb_musicSB, viktor_musicSB, theline_musicSB,ixm_musicSB,rr_musicSB;
Sound level1_theme, level2_theme, level3_theme,losing_theme,menu_theme,BAK_theme,Viktor_theme,Moise_theme;
Enemy* enemy;
~Manager();
Player* createPlayer();
HUD* createHud(Player* player);
Projectiles* createProjectile(int _X, int _Y, int _MOVESPEED, Texture& _TEXTURE, Vector2f _BEHAVIOUR,int _ORIGIN);
void updateProjectiles();
void deleteProjectile(Projectiles* proj);
Enemy* createA(int _X, int _Y, Vector2f _BEHAVIOUR);
Enemy* createAB(int _X, int _Y, Vector2f _BEHAVIOUR);
Enemy* createC(int _X, int _Y, Vector2f _BEHAVIOUR);
Enemy* createD(int _X, int _Y, Vector2f _BEHAVIOUR);
Enemy* createBAK(int _X, int _Y, Vector2f _BEHAVIOUR);
Enemy* createViktor(int _X, int _Y, Vector2f _BEHAVIOUR);
Enemy* createMoise(int _X, int _Y, Vector2f _BEHAVIOUR);
void createEnemy(string _NAME, int _X, int _Y, Vector2f _BEHAVIOUR);
void deleteEnemy(string _NAME, int i);
void draw(RenderWindow& window);
vector<int> getMaxList() const;
vector<int> getEnemyCount() const;
vector<vector<Enemy*>*> getAllEnemies() const;
vector<Enemy*> getAllA() const;
vector<Enemy*> getAllAB()const;
vector<Enemy*> getAllC() const;
vector<Enemy*> getAllD() const;
vector<Enemy*> getAllBAK() const;
vector<Enemy*> getAllViktor() const;
vector<Enemy*> getAllMoise()const;
vector<Projectiles*> getAllProjEnemy() const;
vector<Projectiles*> getAllProjPlayer2() const;
vector<Projectiles*> getAllProjPlayer() const;
vector<Projectiles*> getAllProjLaser() const;
vector<vector<Projectiles*>*> getAllProj() const;
void stopMusic();
};;