Let fruits know what index they are in the beatmap to draw a visual representation

This commit is contained in:
Dean Herbert
2018-01-03 16:31:57 +09:00
parent 31865b4d96
commit 02131d75d4
2 changed files with 15 additions and 5 deletions

View File

@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
if (beatmap.ComboColors.Count == 0)
return;
int comboIndex = 0;
int index = 0;
int colourIndex = 0;
CatchHitObject lastObj = null;
@ -31,12 +31,10 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
if (obj.NewCombo)
{
if (lastObj != null) lastObj.LastInCombo = true;
comboIndex = 0;
colourIndex = (colourIndex + 1) % beatmap.ComboColors.Count;
}
obj.ComboIndex = comboIndex++;
obj.IndexInBeatmap = index++;
obj.ComboColour = beatmap.ComboColors[colourIndex];
lastObj = obj;