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