1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-15 11:22:55 +00:00

Update FunkinSound.hx

This commit is contained in:
cyn 2024-08-23 20:17:10 -07:00 committed by GitHub
parent 9b483de1da
commit 00c7767f8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -543,11 +543,12 @@ class FunkinSound extends FlxSound implements ICloneable<FunkinSound>
/**
* Stop all sounds in the pool and allow them to be recycled.
*/
public static function stopAllAudio(musicToo:Bool = false):Void
public static function stopAllAudio(musicToo:Bool = false, persistToo:Bool = false):Void
{
for (sound in pool)
{
if (sound == null) continue;
if (!persistToo && sound.persist) continue;
if (!musicToo && sound == FlxG.sound.music) continue;
sound.destroy();
}