[Added] Crates, Hud for bullets and health

This commit is contained in:
Ninjaws
2024-12-15 00:12:16 +01:00
parent 55792bb954
commit de958b02e6
17 changed files with 448 additions and 38 deletions
+6 -1
View File
@@ -10,6 +10,7 @@
#include "enums/EBackground.h"
#include "enums/EMap.h"
#include "enums/ESprite.h"
#include "enums/ESound.h"
#include "services/Service.h"
class AssetService: public Service<AssetService>
@@ -32,6 +33,10 @@ public:
return this->sprites[sprite];
}
void playSound(ESound sound) {
PlaySound(sounds[sound]);
}
protected:
AssetService();
@@ -41,7 +46,7 @@ private:
std::string assetDir;
std::unordered_map<EFont, std::string> fonts;
std::vector<Sound> sounds;
std::unordered_map<ESound, Sound> sounds;
std::unordered_map<EMusic, Music> music;
std::unordered_map<EBackground, Texture2D> backgrounds;
std::unordered_map<EMap, std::string> maps;