Closed frastlin closed 5 years ago
Well, you totally could just make a PolyWad and add all your other wads to it as they're created. Looping through an array is also a fine solution. I guess I could make a 'master PolyWad' that all other wads are added to, but I'm not sure if everyone would want/expect that extra layer of routing set up by default.
precedent for this would include: pygame.mixer howler.js
Although the single class of Wad doesn't make it very easy to do global functionality.
hmm... I might have been overthinking this.
I could add a global method like Wad.stopAll()
that just calls stop()
on every wad you've created, and Wad.setVolume()
that calls setVolume()
on every wad you've created. Does that sound like what you need?
yes, I want the stop function
The latest version of Wad.js includes two new methods, Wad.stopAll()
and Wad.setVolume()
. Thanks for raising this issue, and good luck with your game!
Hello, I'm making a game where a user can focus on a sound and it will get louder. I want all other sounds to stop while this one sound is playing. If there was a master polywad that had all sounds, then I could just call stop on the master polywad, play the new sound and when that finishes, call play on the master wad. Now I need to loop through a list of all existing sounds and call stop and play when I want to stop and play them.