mirror of
https://github.com/ppy/osu
synced 2025-02-08 06:07:14 +00:00
Skip outro overlay and PerformExit() call updateCompletionState() instead of scheduleCompletion()
Co-Authored-By: Marlina José <marlina@umich.edu>
This commit is contained in:
parent
fd1241cc85
commit
0b36dd9bce
@ -290,7 +290,7 @@ namespace osu.Game.Screens.Play
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Bind the judgement processors to ourselves
|
// Bind the judgement processors to ourselves
|
||||||
ScoreProcessor.HasCompleted.ValueChanged += updateCompletionState;
|
ScoreProcessor.HasCompleted.BindValueChanged(e => updateCompletionState(e));
|
||||||
HealthProcessor.Failed += onFail;
|
HealthProcessor.Failed += onFail;
|
||||||
|
|
||||||
foreach (var mod in Mods.Value.OfType<IApplicableToScoreProcessor>())
|
foreach (var mod in Mods.Value.OfType<IApplicableToScoreProcessor>())
|
||||||
@ -370,7 +370,7 @@ namespace osu.Game.Screens.Play
|
|||||||
},
|
},
|
||||||
skipOutroOverlay = new SkipOverlay(Beatmap.Value.Storyboard.LatestEventTime ?? 0)
|
skipOutroOverlay = new SkipOverlay(Beatmap.Value.Storyboard.LatestEventTime ?? 0)
|
||||||
{
|
{
|
||||||
RequestSkip = scheduleCompletion,
|
RequestSkip = () => updateCompletionState(new ValueChangedEvent<bool>(true, true), true),
|
||||||
Alpha = 0
|
Alpha = 0
|
||||||
},
|
},
|
||||||
FailOverlay = new FailOverlay
|
FailOverlay = new FailOverlay
|
||||||
@ -542,7 +542,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
// if the score is ready for display but results screen has not been pushed yet (e.g. storyboard is still playing beyond gameplay), then transition to results screen instead of exiting.
|
// if the score is ready for display but results screen has not been pushed yet (e.g. storyboard is still playing beyond gameplay), then transition to results screen instead of exiting.
|
||||||
if (prepareScoreForDisplayTask != null)
|
if (prepareScoreForDisplayTask != null)
|
||||||
scheduleCompletion();
|
updateCompletionState(new ValueChangedEvent<bool>(true, true), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Exit();
|
this.Exit();
|
||||||
@ -581,7 +581,7 @@ namespace osu.Game.Screens.Play
|
|||||||
private ScheduledDelegate completionProgressDelegate;
|
private ScheduledDelegate completionProgressDelegate;
|
||||||
private Task<ScoreInfo> prepareScoreForDisplayTask;
|
private Task<ScoreInfo> prepareScoreForDisplayTask;
|
||||||
|
|
||||||
private void updateCompletionState(ValueChangedEvent<bool> completionState)
|
private void updateCompletionState(ValueChangedEvent<bool> completionState, bool skipStoryboardOutro = false)
|
||||||
{
|
{
|
||||||
// screen may be in the exiting transition phase.
|
// screen may be in the exiting transition phase.
|
||||||
if (!this.IsCurrentScreen())
|
if (!this.IsCurrentScreen())
|
||||||
@ -631,6 +631,12 @@ namespace osu.Game.Screens.Play
|
|||||||
return score.ScoreInfo;
|
return score.ScoreInfo;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (skipStoryboardOutro)
|
||||||
|
{
|
||||||
|
scheduleCompletion();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var storyboardHasOutro = DimmableStoryboard.ContentDisplayed && !DimmableStoryboard.HasStoryboardEnded.Value;
|
var storyboardHasOutro = DimmableStoryboard.ContentDisplayed && !DimmableStoryboard.HasStoryboardEnded.Value;
|
||||||
|
|
||||||
if (storyboardHasOutro)
|
if (storyboardHasOutro)
|
||||||
|
Loading…
Reference in New Issue
Block a user