This repository has been archived by the owner on Sep 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
collisionmanager.h
65 lines (52 loc) · 2.06 KB
/
collisionmanager.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 COLLISIONMANAGER_H
#define COLLISIONMANAGER_H
#include "entity.h"
#include "MainSpaceShip.h"
#include "iostream"
#include "bullet.h"
#include "enemy.h"
#include "flyingpowerup.h"
#include "explosion.h"
#include"Collision.h"
class CollisionManager
{
public:
CollisionManager();
CollisionManager(MainSpaceShip *playerShip, std::vector<Bullet *> *playerBulletList, std::vector<Enemy *> *enemyList, std::vector<Bullet *> *enemyBulletList);
bool checkCollisions();
MainSpaceShip *getPlayerShip() const;
void setPlayerShip(MainSpaceShip *value);
std::vector<Enemy *> *getEnemyList() const;
void setEnemyList(std::vector<Enemy *> *value);
std::vector<Bullet *> *getPlayerBulletList() const;
void setPlayerBulletList(std::vector<Bullet *> *value);
std::vector<Bullet *> *getEnemyBulletList() const;
void setEnemyBulletList(std::vector<Bullet *> *value);
int getLastScore();
void addLastScore(int score);
void setLastScore(int value);
std::vector<FlyingPowerUp *> *getPowerUpList() const;
void setPowerUpList(std::vector<FlyingPowerUp *> *value);
std::vector<Explosion *> *getExplosionList() const;
void setExplosionList(std::vector<Explosion *> *value);
Queue<powerUp> *getPlayerPowerUpsQueue() const;
void setPlayerPowerUpsQueue(Queue<powerUp> *value);
void *getUpdatePowerUpsLabel() const;
void setUpdatePowerUpsLabel(void *value);
private:
int lastScore=0;
std::vector<Enemy *> *enemyList;
std::vector<Bullet *> *playerBulletList;
std::vector<Bullet *> *enemyBulletList;
std::vector<FlyingPowerUp *> *powerUpList;
Queue<powerUp> *playerPowerUpsQueue;
std::vector<Explosion *> *explosionList;
MainSpaceShip *playerShip;
SoundBuffer collisionSpaceEnemySoundBuffer;
SoundBuffer collisionBulletEnemySoundBuffer;
Sound collisionSound;
void deleteEnemy(std::vector<Enemy *> *list, int index);
void deleteBullet(std::vector<Bullet *> *list, int index);
void deletePowerUp(std::vector<FlyingPowerUp *> *list, int index);
};
#endif // COLLISIONMANAGER_H