mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 00:52:57 +08:00
Fix ResumeContainers appearing when resuming during breaks.
This commit is contained in:
parent
f2f60f6d03
commit
e76897d6a7
@ -23,6 +23,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private readonly Container fadeContainer;
|
||||
|
||||
public bool IsActive { get; private set; }
|
||||
|
||||
public List<BreakPeriod> Breaks
|
||||
{
|
||||
get => breaks;
|
||||
@ -125,6 +127,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
using (BeginAbsoluteSequence(b.StartTime, true))
|
||||
{
|
||||
Schedule(() => IsActive = true);
|
||||
fadeContainer.FadeIn(fade_duration);
|
||||
breakArrows.Show(fade_duration);
|
||||
|
||||
@ -142,6 +145,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
using (BeginDelayedSequence(b.Duration - fade_duration, true))
|
||||
{
|
||||
Schedule(() => IsActive = false);
|
||||
fadeContainer.FadeOut(fade_duration);
|
||||
breakArrows.Hide(fade_duration);
|
||||
}
|
||||
|
@ -60,6 +60,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private SampleChannel sampleRestart;
|
||||
|
||||
private BreakOverlay breakOverlay;
|
||||
|
||||
protected ScoreProcessor ScoreProcessor { get; private set; }
|
||||
protected DrawableRuleset DrawableRuleset { get; private set; }
|
||||
|
||||
@ -115,7 +117,7 @@ namespace osu.Game.Screens.Play
|
||||
Child = DrawableRuleset
|
||||
}
|
||||
},
|
||||
new BreakOverlay(working.Beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
|
||||
breakOverlay = new BreakOverlay(working.Beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
@ -405,8 +407,8 @@ namespace osu.Game.Screens.Play
|
||||
IsResuming = true;
|
||||
PauseOverlay.Hide();
|
||||
|
||||
// time-based conditions may allow instant resume.
|
||||
if (GameplayClockContainer.GameplayClock.CurrentTime < Beatmap.Value.Beatmap.HitObjects.First().StartTime)
|
||||
// breaks and time-based conditions may allow instant resume.
|
||||
if (breakOverlay.IsActive || GameplayClockContainer.GameplayClock.CurrentTime < Beatmap.Value.Beatmap.HitObjects.First().StartTime)
|
||||
completeResume();
|
||||
else
|
||||
DrawableRuleset.RequestResume(completeResume);
|
||||
|
Loading…
Reference in New Issue
Block a user