-
Notifications
You must be signed in to change notification settings - Fork 0
/
Textures.cpp
46 lines (34 loc) · 1.17 KB
/
Textures.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
#include "Textures.h"
//load all texture and insert into a vector
Textures::Textures(void)
{
//TODO: not hardcode how texture is loaded
sf::Texture texture1;
texture1.loadFromFile("Assets/buttonSheet.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/playerSheet.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/ghostSheet.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/background.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/gameover.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/gravesheet.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/gamebackground.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/paused.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/complete.png");
mSheets.insert(mSheets.end(), texture1);
texture1.loadFromFile("Assets/ball.png");
mSheets.insert(mSheets.end(), texture1);
}
Textures::~Textures(void)
{
}
sf::Texture* Textures::getTexture(SPRITESHEETS pSheet)
{
return &(mSheets.at(pSheet));
}