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:
parent
9b483de1da
commit
00c7767f8a
|
@ -543,11 +543,12 @@ class FunkinSound extends FlxSound implements ICloneable<FunkinSound>
|
||||||
/**
|
/**
|
||||||
* Stop all sounds in the pool and allow them to be recycled.
|
* 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)
|
for (sound in pool)
|
||||||
{
|
{
|
||||||
if (sound == null) continue;
|
if (sound == null) continue;
|
||||||
|
if (!persistToo && sound.persist) continue;
|
||||||
if (!musicToo && sound == FlxG.sound.music) continue;
|
if (!musicToo && sound == FlxG.sound.music) continue;
|
||||||
sound.destroy();
|
sound.destroy();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue