More boss fight UI done and a bit of ambient sound working.
This commit is contained in:
parent
64807174c0
commit
a0c0308461
12 changed files with 111 additions and 58 deletions
|
@ -37,13 +37,14 @@ namespace sound {
|
|||
SMGR.sounds.try_emplace(name, buffer, sound);
|
||||
}
|
||||
|
||||
void play(const std::string name) {
|
||||
void play(const std::string name, bool loop) {
|
||||
dbc::check(initialized, "You need to call sound::init() first");
|
||||
if(muted) return;
|
||||
|
||||
if(SMGR.sounds.contains(name)) {
|
||||
// get the sound from the sound map
|
||||
auto pair = SMGR.sounds.at(name);
|
||||
pair.sound->setLooping(loop);
|
||||
// play it
|
||||
pair.sound->play();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue