mirror of
https://github.com/devZoGok/gameBase.git
synced 2026-08-26 19:43:28 +00:00
34 lines
557 B
C++
34 lines
557 B
C++
#ifndef SOUND_MANAGER_H
|
|
#define SOUND_MANAGER_H
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace sf{
|
|
class Music;
|
|
}
|
|
|
|
namespace gameBase{
|
|
class SoundManager{
|
|
public:
|
|
static SoundManager* getSingleton();
|
|
void update();
|
|
void play(std::vector<std::string>, int, bool, bool);
|
|
private:
|
|
struct Track{
|
|
std::string path = "";
|
|
sf::Music *soundObj = nullptr;
|
|
|
|
Track(std::string);
|
|
};
|
|
SoundManager(){}
|
|
void clearPlaylist();
|
|
|
|
int currentTrackId = 0;
|
|
bool loop, shuffle;
|
|
std::vector<Track> currentPlaylist;
|
|
};
|
|
}
|
|
|
|
#endif
|