mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-15 11:22:55 +00:00
Stop the volume tray from hiding as long as the game is muted
This commit is contained in:
parent
29a7005d8a
commit
c7238fcfd1
|
@ -79,10 +79,12 @@ class FunkinSoundTray extends FlxSoundTray
|
||||||
y = MathUtil.coolLerp(y, lerpYPos, 0.1);
|
y = MathUtil.coolLerp(y, lerpYPos, 0.1);
|
||||||
alpha = MathUtil.coolLerp(alpha, alphaTarget, 0.25);
|
alpha = MathUtil.coolLerp(alpha, alphaTarget, 0.25);
|
||||||
|
|
||||||
|
var shouldHide = (FlxG.sound.muted == false && FlxG.sound.volume > 0);
|
||||||
|
|
||||||
// Animate sound tray thing
|
// Animate sound tray thing
|
||||||
if (_timer > 0)
|
if (_timer > 0)
|
||||||
{
|
{
|
||||||
_timer -= (MS / 1000);
|
if (shouldHide) _timer -= (MS / 1000);
|
||||||
alphaTarget = 1;
|
alphaTarget = 1;
|
||||||
}
|
}
|
||||||
else if (y >= -height)
|
else if (y >= -height)
|
||||||
|
|
Loading…
Reference in a new issue