mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 14:53:01 +08:00
Simplify implementation, play fail animation during restart
This commit is contained in:
parent
1150e9fdfb
commit
2fcc8c2d72
@ -360,7 +360,9 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private bool onFail()
|
||||
{
|
||||
if (Mods.Value.OfType<IApplicableFailOverride>().Any(m => !m.AllowFail))
|
||||
var failOverrideMods = Mods.Value.OfType<IApplicableFailOverride>();
|
||||
|
||||
if (failOverrideMods.Any(m => !m.AllowFail))
|
||||
return false;
|
||||
|
||||
HasFailed = true;
|
||||
@ -371,13 +373,10 @@ namespace osu.Game.Screens.Play
|
||||
if (PauseOverlay.State.Value == Visibility.Visible)
|
||||
PauseOverlay.Hide();
|
||||
|
||||
if (Beatmap.Value.Mods.Value.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail))
|
||||
{
|
||||
Restart();
|
||||
return true;
|
||||
}
|
||||
|
||||
failAnimation.Start();
|
||||
if (failOverrideMods.Any(m => m.RestartOnFail))
|
||||
Restart();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user