mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09: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.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;
|
||||||
@ -78,9 +80,7 @@ namespace osu.Game.Screens.Play
|
|||||||
private IAPIProvider api { get; set; }
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
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,21 +564,20 @@ 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();
|
||||||
|
|
||||||
// breaks and time-based conditions may allow instant resume.
|
// breaks and time-based conditions may allow instant resume.
|
||||||
if (breakTracker.IsBreakTime.Value)
|
if (breakTracker.IsBreakTime.Value)
|
||||||
completeResume();
|
completeResume();
|
||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -717,7 +711,12 @@ namespace osu.Game.Screens.Play
|
|||||||
Background.EnableUserDim.Value = false;
|
Background.EnableUserDim.Value = false;
|
||||||
storyboardReplacesBackground.Value = false;
|
storyboardReplacesBackground.Value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user