Implement Score Processor Mod Interface

- Add a delegate whenever we want to register an additional fail condition
This commit is contained in:
Brayzure
2017-11-20 02:15:29 -05:00
parent de4d8eb196
commit da30d76f9b
6 changed files with 74 additions and 28 deletions

View File

@ -228,11 +228,15 @@ namespace osu.Game.Screens.Play
scoreProcessor.AllJudged += onCompletion;
scoreProcessor.Failed += onFail;
if (Beatmap.Value.Mods.Value.Any(m => m.Name == "Sudden Death"))
scoreProcessor.strictFail = 1;
applyAlternateFailConditions();
}
if (Beatmap.Value.Mods.Value.Any(m => m.Name == "Perfect"))
scoreProcessor.strictFail = 2;
private void applyAlternateFailConditions()
{
foreach(var mod in Beatmap.Value.Mods.Value.OfType<IApplicableToScoreProcessor>())
{
mod.ApplyToScoreProcessor(scoreProcessor);
}
}
private void applyRateFromMods()