mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Simplify implementation, play fail animation during restart
This commit is contained in:
@ -360,7 +360,9 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private bool onFail()
|
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;
|
return false;
|
||||||
|
|
||||||
HasFailed = true;
|
HasFailed = true;
|
||||||
@ -371,13 +373,10 @@ namespace osu.Game.Screens.Play
|
|||||||
if (PauseOverlay.State.Value == Visibility.Visible)
|
if (PauseOverlay.State.Value == Visibility.Visible)
|
||||||
PauseOverlay.Hide();
|
PauseOverlay.Hide();
|
||||||
|
|
||||||
if (Beatmap.Value.Mods.Value.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail))
|
|
||||||
{
|
|
||||||
Restart();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
failAnimation.Start();
|
failAnimation.Start();
|
||||||
|
if (failOverrideMods.Any(m => m.RestartOnFail))
|
||||||
|
Restart();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user