mirror of
https://github.com/ppy/osu
synced 2025-01-04 21:30:08 +00:00
Centralize updating HasCompleted bindable logic
This commit is contained in:
parent
65a8860a65
commit
6f233917b1
@ -58,8 +58,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
|
|
||||||
NewJudgement?.Invoke(result);
|
NewJudgement?.Invoke(result);
|
||||||
|
|
||||||
if (JudgedHits == MaxHits)
|
updateHasCompleted();
|
||||||
hasCompleted.Value = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -70,8 +69,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
{
|
{
|
||||||
JudgedHits--;
|
JudgedHits--;
|
||||||
|
|
||||||
if (JudgedHits < MaxHits)
|
updateHasCompleted();
|
||||||
hasCompleted.Value = false;
|
|
||||||
|
|
||||||
RevertResultInternal(result);
|
RevertResultInternal(result);
|
||||||
}
|
}
|
||||||
@ -135,5 +133,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
ApplyResult(result);
|
ApplyResult(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateHasCompleted() => hasCompleted.Value = JudgedHits == MaxHits;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user