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:
parent
1b27ce6198
commit
18b9828c49
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user