1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 21:27:24 +08:00

Add volume dip to track during fail sequence

This commit is contained in:
Jamie Taylor 2022-01-13 18:31:32 +09:00
parent 7147799895
commit c6ae255326
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C

View File

@ -36,6 +36,7 @@ namespace osu.Game.Screens.Play
private readonly DrawableRuleset drawableRuleset;
private readonly BindableDouble trackFreq = new BindableDouble(1);
private readonly BindableDouble volumeAdjustment = new BindableDouble(0.5);
private Container filters;
@ -125,6 +126,7 @@ namespace osu.Game.Screens.Play
failSample.Play();
track.AddAdjustment(AdjustableProperty.Frequency, trackFreq);
track.AddAdjustment(AdjustableProperty.Volume, volumeAdjustment);
applyToPlayfield(drawableRuleset.Playfield);
drawableRuleset.Playfield.HitObjectContainer.FadeOut(duration / 2);
@ -154,6 +156,8 @@ namespace osu.Game.Screens.Play
if (resetTrackFrequency)
track?.RemoveAdjustment(AdjustableProperty.Frequency, trackFreq);
track?.RemoveAdjustment(AdjustableProperty.Volume, volumeAdjustment);
if (filters.Parent == null)
return;