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

Stop the volume tray from hiding as long as the game is muted

This commit is contained in:
EliteMasterEric 2024-09-22 00:45:30 -04:00
parent 29a7005d8a
commit c7238fcfd1

View file

@ -79,10 +79,12 @@ class FunkinSoundTray extends FlxSoundTray
y = MathUtil.coolLerp(y, lerpYPos, 0.1);
alpha = MathUtil.coolLerp(alpha, alphaTarget, 0.25);
var shouldHide = (FlxG.sound.muted == false && FlxG.sound.volume > 0);
// Animate sound tray thing
if (_timer > 0)
{
_timer -= (MS / 1000);
if (shouldHide) _timer -= (MS / 1000);
alphaTarget = 1;
}
else if (y >= -height)