mirror of https://github.com/ppy/osu
Fix dual specification of `SuspensionHandler` and move fields around slightly
This commit is contained in:
parent
9bf29503fb
commit
da96cc73d8
|
@ -62,8 +62,6 @@ public abstract class Player : ScreenWithBeatmapBackground, ISamplePlaybackDisab
|
|||
|
||||
private readonly Bindable<bool> samplePlaybackDisabled = new Bindable<bool>();
|
||||
|
||||
private AudioFilter lowPassFilter;
|
||||
|
||||
/// <summary>
|
||||
/// Whether gameplay should pause when the game window focus is lost.
|
||||
/// </summary>
|
||||
|
@ -217,7 +215,7 @@ private void load(AudioManager audio, OsuConfigManager config, OsuGameBase game)
|
|||
InternalChild = GameplayClockContainer = CreateGameplayClockContainer(Beatmap.Value, DrawableRuleset.GameplayStartTime);
|
||||
|
||||
AddInternal(screenSuspension = new ScreenSuspensionHandler(GameplayClockContainer));
|
||||
AddInternal(lowPassFilter = new AudioFilter(audio.TrackMixer));
|
||||
AddInternal(failLowPassFilter = new AudioFilter(audio.TrackMixer));
|
||||
|
||||
Score = CreateScore(playableBeatmap);
|
||||
|
||||
|
@ -228,8 +226,6 @@ private void load(AudioManager audio, OsuConfigManager config, OsuGameBase game)
|
|||
|
||||
dependencies.CacheAs(GameplayState = new GameplayState(playableBeatmap, ruleset, gameplayMods, Score));
|
||||
|
||||
AddInternal(screenSuspension = new ScreenSuspensionHandler(GameplayClockContainer));
|
||||
|
||||
var rulesetSkinProvider = new RulesetSkinProvidingContainer(ruleset, playableBeatmap, Beatmap.Value.Skin);
|
||||
|
||||
// load the skinning hierarchy first.
|
||||
|
@ -774,6 +770,8 @@ private void progressToResults(bool withDelay)
|
|||
|
||||
private FailAnimation failAnimation;
|
||||
|
||||
private AudioFilter failLowPassFilter;
|
||||
|
||||
private bool onFail()
|
||||
{
|
||||
if (!CheckModsAllowFailure())
|
||||
|
@ -788,7 +786,7 @@ private bool onFail()
|
|||
if (PauseOverlay.State.Value == Visibility.Visible)
|
||||
PauseOverlay.Hide();
|
||||
|
||||
lowPassFilter.CutoffTo(300, 2500, Easing.OutCubic);
|
||||
failLowPassFilter.CutoffTo(300, 2500, Easing.OutCubic);
|
||||
failAnimation.Start();
|
||||
|
||||
if (GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail))
|
||||
|
@ -801,7 +799,7 @@ private bool onFail()
|
|||
private void onFailComplete()
|
||||
{
|
||||
GameplayClockContainer.Stop();
|
||||
lowPassFilter.CutoffTo(AudioFilter.MAX_LOWPASS_CUTOFF);
|
||||
failLowPassFilter.CutoffTo(AudioFilter.MAX_LOWPASS_CUTOFF);
|
||||
|
||||
FailOverlay.Retries = RestartCount;
|
||||
FailOverlay.Show();
|
||||
|
|
Loading…
Reference in New Issue