mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Merge branch 'master' into disallow-multiplayer-restart-retry
This commit is contained in:
@ -374,7 +374,7 @@ namespace osu.Game.Screens.Play
|
||||
if (!this.IsCurrentScreen()) return;
|
||||
|
||||
fadeOut(true);
|
||||
performImmediateExit();
|
||||
PerformExit(true);
|
||||
},
|
||||
},
|
||||
failAnimation = new FailAnimation(DrawableRuleset) { OnComplete = onFailComplete, },
|
||||
@ -463,20 +463,30 @@ namespace osu.Game.Screens.Play
|
||||
return playable;
|
||||
}
|
||||
|
||||
private void performImmediateExit()
|
||||
/// <summary>
|
||||
/// Exits the <see cref="Player"/>.
|
||||
/// </summary>
|
||||
/// <param name="userRequested">
|
||||
/// Whether the exit is requested by the user, or a higher-level game component.
|
||||
/// Pausing is allowed only in the former case.
|
||||
/// </param>
|
||||
protected void PerformExit(bool userRequested)
|
||||
{
|
||||
// if a restart has been requested, cancel any pending completion (user has shown intent to restart).
|
||||
completionProgressDelegate?.Cancel();
|
||||
|
||||
ValidForResume = false;
|
||||
|
||||
performUserRequestedExit();
|
||||
if (!this.IsCurrentScreen()) return;
|
||||
|
||||
if (userRequested)
|
||||
performUserRequestedExit();
|
||||
else
|
||||
this.Exit();
|
||||
}
|
||||
|
||||
private void performUserRequestedExit()
|
||||
{
|
||||
if (!this.IsCurrentScreen()) return;
|
||||
|
||||
if (ValidForResume && HasFailed && !FailOverlay.IsPresent)
|
||||
{
|
||||
failAnimation.FinishTransforms(true);
|
||||
@ -506,7 +516,7 @@ namespace osu.Game.Screens.Play
|
||||
RestartRequested?.Invoke();
|
||||
|
||||
if (this.IsCurrentScreen())
|
||||
performImmediateExit();
|
||||
PerformExit(true);
|
||||
else
|
||||
this.MakeCurrent();
|
||||
}
|
||||
|
Reference in New Issue
Block a user