mirror of
https://github.com/osukey/osukey.git
synced 2025-05-05 21:57:24 +09:00
Merge remote-tracking branch 'refs/remotes/ppy/master' into requests-expanded
This commit is contained in:
commit
2d0f555048
0
.gitmodules
vendored
0
.gitmodules
vendored
@ -1,2 +0,0 @@
|
|||||||
language: csharp
|
|
||||||
solution: osu.sln
|
|
@ -255,7 +255,7 @@ namespace osu.Game.Screens.Play
|
|||||||
private void performImmediateExit()
|
private void performImmediateExit()
|
||||||
{
|
{
|
||||||
// if a restart has been requested, cancel any pending completion (user has shown intent to restart).
|
// if a restart has been requested, cancel any pending completion (user has shown intent to restart).
|
||||||
onCompletionEvent = null;
|
completionProgressDelegate?.Cancel();
|
||||||
|
|
||||||
ValidForResume = false;
|
ValidForResume = false;
|
||||||
|
|
||||||
@ -275,20 +275,16 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
sampleRestart?.Play();
|
sampleRestart?.Play();
|
||||||
|
|
||||||
// if a restart has been requested, cancel any pending completion (user has shown intent to restart).
|
|
||||||
onCompletionEvent = null;
|
|
||||||
|
|
||||||
ValidForResume = false;
|
|
||||||
RestartRequested?.Invoke();
|
RestartRequested?.Invoke();
|
||||||
this.Exit();
|
performImmediateExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ScheduledDelegate onCompletionEvent;
|
private ScheduledDelegate completionProgressDelegate;
|
||||||
|
|
||||||
private void onCompletion()
|
private void onCompletion()
|
||||||
{
|
{
|
||||||
// Only show the completion screen if the player hasn't failed
|
// Only show the completion screen if the player hasn't failed
|
||||||
if (ScoreProcessor.HasFailed || onCompletionEvent != null)
|
if (ScoreProcessor.HasFailed || completionProgressDelegate != null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ValidForResume = false;
|
ValidForResume = false;
|
||||||
@ -297,7 +293,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
using (BeginDelayedSequence(1000))
|
using (BeginDelayedSequence(1000))
|
||||||
{
|
{
|
||||||
onCompletionEvent = Schedule(delegate
|
completionProgressDelegate = Schedule(delegate
|
||||||
{
|
{
|
||||||
if (!this.IsCurrentScreen()) return;
|
if (!this.IsCurrentScreen()) return;
|
||||||
|
|
||||||
@ -306,8 +302,6 @@ namespace osu.Game.Screens.Play
|
|||||||
scoreManager.Import(score).Wait();
|
scoreManager.Import(score).Wait();
|
||||||
|
|
||||||
this.Push(CreateResults(score));
|
this.Push(CreateResults(score));
|
||||||
|
|
||||||
onCompletionEvent = null;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -471,10 +465,10 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public override bool OnExiting(IScreen next)
|
public override bool OnExiting(IScreen next)
|
||||||
{
|
{
|
||||||
if (onCompletionEvent != null)
|
if (completionProgressDelegate != null && !completionProgressDelegate.Cancelled && !completionProgressDelegate.Completed)
|
||||||
{
|
{
|
||||||
// Proceed to result screen if beatmap already finished playing
|
// proceed to result screen if beatmap already finished playing
|
||||||
onCompletionEvent.RunTask();
|
completionProgressDelegate.RunTask();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user