undid changes to the file

This commit is contained in:
BananeVolante 2020-06-22 13:40:31 +02:00
parent 4e7d60b6ff
commit a4eb6c81c5

View File

@ -5,11 +5,13 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using Humanizer;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Audio; using osu.Framework.Audio;
using osu.Framework.Audio.Sample; using osu.Framework.Audio.Sample;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Audio;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Framework.Logging; using osu.Framework.Logging;
@ -79,8 +81,6 @@ namespace osu.Game.Screens.Play
private SampleChannel sampleRestart; private SampleChannel sampleRestart;
private SampleChannel samplePause;
public BreakOverlay BreakOverlay; public BreakOverlay BreakOverlay;
private BreakTracker breakTracker; private BreakTracker breakTracker;
@ -164,10 +164,6 @@ namespace osu.Game.Screens.Play
sampleRestart = audio.Samples.Get(@"Gameplay/restart"); sampleRestart = audio.Samples.Get(@"Gameplay/restart");
samplePause = audio.Samples.Get(@"Gameplay/pause-loop");
if (samplePause != null)
samplePause.Looping = true;
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel); mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
DrawableRuleset = ruleset.CreateDrawableRulesetWith(playableBeatmap, Mods.Value); DrawableRuleset = ruleset.CreateDrawableRulesetWith(playableBeatmap, Mods.Value);
@ -414,7 +410,6 @@ namespace osu.Game.Screens.Play
Pause(); Pause();
else else
{ {
samplePause?.Stop();
this.Exit(); this.Exit();
} }
} }
@ -569,18 +564,17 @@ namespace osu.Game.Screens.Play
DrawableRuleset.CancelResume(); DrawableRuleset.CancelResume();
IsResuming = false; IsResuming = false;
} }
GameplayClockContainer.Stop(); GameplayClockContainer.Stop();
PauseOverlay.Show(); PauseOverlay.Show();
lastPauseActionTime = GameplayClockContainer.GameplayClock.CurrentTime; lastPauseActionTime = GameplayClockContainer.GameplayClock.CurrentTime;
samplePause?.Play();
} }
public void Resume() public void Resume()
{ {
if (!canResume) return; if (!canResume) return;
IsResuming = true; IsResuming = true;
PauseOverlay.Hide(); PauseOverlay.Hide();
@ -594,8 +588,6 @@ namespace osu.Game.Screens.Play
{ {
GameplayClockContainer.Start(); GameplayClockContainer.Start();
IsResuming = false; IsResuming = false;
samplePause?.Stop();
} }
} }
@ -672,7 +664,9 @@ namespace osu.Game.Screens.Play
// as we are no longer the current screen, we cannot guarantee the track is still usable. // as we are no longer the current screen, we cannot guarantee the track is still usable.
GameplayClockContainer?.StopUsingBeatmapClock(); GameplayClockContainer?.StopUsingBeatmapClock();
fadeOut(); fadeOut();
return base.OnExiting(next); return base.OnExiting(next);
} }
@ -718,6 +712,11 @@ namespace osu.Game.Screens.Play
storyboardReplacesBackground.Value = false; storyboardReplacesBackground.Value = false;
} }
#endregion #endregion
} }
} }