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:
parent
7147799895
commit
c6ae255326
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user