Move low pass fail effect to FailAnimation

This commit is contained in:
Dean Herbert
2021-10-08 12:27:04 +09:00
parent a924b982eb
commit 436ead421a
2 changed files with 9 additions and 7 deletions

View File

@ -15,7 +15,6 @@ using osu.Framework.Input.Events;
using osu.Framework.Logging;
using osu.Framework.Screens;
using osu.Framework.Threading;
using osu.Game.Audio.Effects;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Graphics.Containers;
@ -215,7 +214,6 @@ namespace osu.Game.Screens.Play
InternalChild = GameplayClockContainer = CreateGameplayClockContainer(Beatmap.Value, DrawableRuleset.GameplayStartTime);
AddInternal(screenSuspension = new ScreenSuspensionHandler(GameplayClockContainer));
AddInternal(failLowPassFilter = new AudioFilter(audio.TrackMixer));
Score = CreateScore(playableBeatmap);
@ -770,8 +768,6 @@ namespace osu.Game.Screens.Play
private FailAnimation failAnimation;
private AudioFilter failLowPassFilter;
private bool onFail()
{
if (!CheckModsAllowFailure())
@ -786,7 +782,6 @@ namespace osu.Game.Screens.Play
if (PauseOverlay.State.Value == Visibility.Visible)
PauseOverlay.Hide();
failLowPassFilter.CutoffTo(300, 2500, Easing.OutCubic);
failAnimation.Start();
if (GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail))
@ -799,7 +794,6 @@ namespace osu.Game.Screens.Play
private void onFailComplete()
{
GameplayClockContainer.Stop();
failLowPassFilter.CutoffTo(AudioFilter.MAX_LOWPASS_CUTOFF);
FailOverlay.Retries = RestartCount;
FailOverlay.Show();