Move combo index processing to BeatmapProcessor

This commit is contained in:
Dean Herbert
2018-03-20 15:45:40 +09:00
parent cb3d0db555
commit c38c26eacb
5 changed files with 57 additions and 38 deletions

View File

@ -13,24 +13,7 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
public override void PostProcess(Beatmap<OsuHitObject> beatmap)
{
applyStacking(beatmap);
if (beatmap.ComboColours.Count == 0)
return;
int comboIndex = 0;
int colourIndex = 0;
foreach (var obj in beatmap.HitObjects)
{
if (obj.NewCombo)
{
comboIndex = 0;
colourIndex = (colourIndex + 1) % beatmap.ComboColours.Count;
}
obj.IndexInCurrentCombo = comboIndex++;
obj.ComboColour = beatmap.ComboColours[colourIndex];
}
base.PostProcess(beatmap);
}
private void applyStacking(Beatmap<OsuHitObject> beatmap)