forked from johannawald/ICT207
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AssertManager.cpp
74 lines (63 loc) · 2.77 KB
/
AssertManager.cpp
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
// @ Unit : ICT207
// @ File Name : AssertManager.cpp
// @ Author : Johanna Wald
//
//
#include "AssertManager.h"
AssertManager* AssertManager::assertmanager = nullptr;
AssertManager::AssertManager() {
}
void AssertManager::clear() {
for (int i = 0; i <= 15; i++)
delete List[i];
}
AssertManager* AssertManager::getInstance() {
if(AssertManager::assertmanager==nullptr)
{
assertmanager = new AssertManager();
return assertmanager;
}
else return assertmanager;
}
AssertManager::~AssertManager() {
clear();
}
/*ci::gl::Texture AssertManager::getimage(GameImages images) {
return List[images]->image;
}
int AssertManager::getrow(GameImages images) {
return List[images]->row;
}
int AssertManager::getcol(GameImages images) {
return List[images]->col;
}*/
void AssertManager::init() {
//Verschiedene Elemente:
/*List[imgPoint] = new GameImage(loadImage(ci::app::loadAsset("point.png")),0,0);
List[imgPacman] = new GameImage(loadImage(ci::app::loadAsset("pacman.png")),7,3);
List[imgGhostBlue] = new GameImage(loadImage(ci::app::loadAsset("GhostBlue.png")),0,0);
List[imgGhostGreen] = new GameImage(loadImage(ci::app::loadAsset("GhostGreen.png")),0,0);
List[imgGhostPurple] = new GameImage(loadImage(ci::app::loadAsset("GhostPurple.png")),0,0);
List[imgGhostFollow] = new GameImage(loadImage(ci::app::loadAsset("GhostPurple.png")),0,0);
List[imgCherry] = new GameImage(loadImage(ci::app::loadAsset("Cherry.png")),0,0);
List[imgStrawberry] = new GameImage(loadImage(ci::app::loadAsset("Strawberry.png")),0,0);
List[imgFireBall] = new GameImage(loadImage(ci::app::loadAsset("fireball.png")),0,0);
List[imgFireFlower] = new GameImage(loadImage(ci::app::loadAsset("FireFlower.png")),0,0);
List[imgCannonBall] = new GameImage(loadImage(ci::app::loadAsset("Canone.png")),0,0);
//Hintergründe:
List[imgStartMenue] = new GameImage(loadImage(ci::app::loadAsset("Menue.png")),1,1);
List[imgGameOverMenue] = new GameImage(loadImage(ci::app::loadAsset("GameOver.png")),1,1);
List[imgGamePlayBG] = new GameImage(loadImage(ci::app::loadAsset("GamePlay.png")),1,1);
List[imgGameBG] = new GameImage(loadImage(ci::app::loadAsset("GamePlay.png")),1,1);
List[imgGamePlayBGSingle] = new GameImage(loadImage(ci::app::loadAsset("GamePlaySingle.png")),1,1);
List[imgYouLost] = new GameImage(loadImage(ci::app::loadAsset("YouLost.png")),1,1);
List[imgYouWon] = new GameImage(loadImage(ci::app::loadAsset("YouWon.png")),1,1);
List[imgPauseMenue] = new GameImage(loadImage(ci::app::loadAsset("PauseMenue.png")),1,1);
List[imgClearBG] = new GameImage(loadImage(ci::app::loadAsset("ClearBG.png")),1,1);
List[imgTestRect] = new GameImage(loadImage(ci::app::loadAsset("TestRect.png")),1,1);*/
}
void AssertManager::realoadimages() {
//Speicher freigeben
clear();
init();
}