mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 21:07:33 +08:00
undid changes to the file
This commit is contained in:
parent
4e7d60b6ff
commit
a4eb6c81c5
@ -5,11 +5,13 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Humanizer;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Audio;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Logging;
|
||||
@ -78,9 +80,7 @@ namespace osu.Game.Screens.Play
|
||||
private IAPIProvider api { get; set; }
|
||||
|
||||
private SampleChannel sampleRestart;
|
||||
|
||||
private SampleChannel samplePause;
|
||||
|
||||
|
||||
public BreakOverlay BreakOverlay;
|
||||
|
||||
private BreakTracker breakTracker;
|
||||
@ -164,10 +164,6 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
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);
|
||||
|
||||
DrawableRuleset = ruleset.CreateDrawableRulesetWith(playableBeatmap, Mods.Value);
|
||||
@ -414,7 +410,6 @@ namespace osu.Game.Screens.Play
|
||||
Pause();
|
||||
else
|
||||
{
|
||||
samplePause?.Stop();
|
||||
this.Exit();
|
||||
}
|
||||
}
|
||||
@ -569,21 +564,20 @@ namespace osu.Game.Screens.Play
|
||||
DrawableRuleset.CancelResume();
|
||||
IsResuming = false;
|
||||
}
|
||||
|
||||
GameplayClockContainer.Stop();
|
||||
PauseOverlay.Show();
|
||||
lastPauseActionTime = GameplayClockContainer.GameplayClock.CurrentTime;
|
||||
|
||||
samplePause?.Play();
|
||||
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
if (!canResume) return;
|
||||
|
||||
|
||||
IsResuming = true;
|
||||
PauseOverlay.Hide();
|
||||
|
||||
|
||||
// breaks and time-based conditions may allow instant resume.
|
||||
if (breakTracker.IsBreakTime.Value)
|
||||
completeResume();
|
||||
@ -594,8 +588,6 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
GameplayClockContainer.Start();
|
||||
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.
|
||||
GameplayClockContainer?.StopUsingBeatmapClock();
|
||||
|
||||
|
||||
fadeOut();
|
||||
|
||||
return base.OnExiting(next);
|
||||
}
|
||||
|
||||
@ -717,7 +711,12 @@ namespace osu.Game.Screens.Play
|
||||
Background.EnableUserDim.Value = false;
|
||||
storyboardReplacesBackground.Value = false;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user