1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 04:02:59 +08:00

Merge UpdateFailed and CheckAlternateFailConditions

This commit is contained in:
smoogipoo 2017-11-21 17:11:07 +09:00
parent 1b27ce6198
commit 18b9828c49

View File

@ -126,7 +126,10 @@ namespace osu.Game.Rulesets.Scoring
/// </summary>
protected void UpdateFailed()
{
if (HasFailed || !DefaultFailCondition)
if (HasFailed)
return;
if (!DefaultFailCondition && FailConditions?.Invoke(this) != true)
return;
if (Failed?.Invoke() != false)
@ -145,18 +148,6 @@ namespace osu.Game.Rulesets.Scoring
AllJudged?.Invoke();
}
protected void CheckAlternateFailConditions()
{
if (HasFailed)
return;
if (FailConditions?.Invoke(this) == true)
{
if (Failed?.Invoke() != false)
HasFailed = true;
}
}
/// <summary>
/// Retrieve a score populated with data for the current play this processor is responsible for.
/// </summary>
@ -233,8 +224,6 @@ namespace osu.Game.Rulesets.Scoring
OnNewJudgement(judgement);
updateScore();
CheckAlternateFailConditions();
NotifyNewJudgement(judgement);
UpdateFailed();
}