2017-09-18 11:48:33 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2017-11-28 20:22:57 +08:00
|
|
|
|
using System.Collections.Generic;
|
2017-09-18 11:48:33 +08:00
|
|
|
|
using osu.Game.Beatmaps;
|
2017-09-15 19:54:34 +08:00
|
|
|
|
using osu.Game.Rulesets.Catch.Objects;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Beatmaps
|
|
|
|
|
{
|
2017-11-28 17:37:41 +08:00
|
|
|
|
internal class CatchBeatmapProcessor : BeatmapProcessor<CatchHitObject>
|
2017-09-15 19:54:34 +08:00
|
|
|
|
{
|
2017-11-28 17:37:41 +08:00
|
|
|
|
public override void PostProcess(Beatmap<CatchHitObject> beatmap)
|
2017-09-15 19:54:34 +08:00
|
|
|
|
{
|
|
|
|
|
if (beatmap.ComboColors.Count == 0)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
int comboIndex = 0;
|
|
|
|
|
int colourIndex = 0;
|
|
|
|
|
|
2017-11-28 17:37:41 +08:00
|
|
|
|
CatchHitObject lastObj = null;
|
2017-09-15 19:54:34 +08:00
|
|
|
|
|
2017-11-28 20:22:57 +08:00
|
|
|
|
convertHyperDash(beatmap.HitObjects);
|
|
|
|
|
|
2017-09-15 19:54:34 +08:00
|
|
|
|
foreach (var obj in beatmap.HitObjects)
|
|
|
|
|
{
|
|
|
|
|
if (obj.NewCombo)
|
|
|
|
|
{
|
|
|
|
|
if (lastObj != null) lastObj.LastInCombo = true;
|
|
|
|
|
|
|
|
|
|
comboIndex = 0;
|
|
|
|
|
colourIndex = (colourIndex + 1) % beatmap.ComboColors.Count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
obj.ComboIndex = comboIndex++;
|
|
|
|
|
obj.ComboColour = beatmap.ComboColors[colourIndex];
|
|
|
|
|
|
|
|
|
|
lastObj = obj;
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-11-28 20:22:57 +08:00
|
|
|
|
|
|
|
|
|
private void convertHyperDash(List<CatchHitObject> objects)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2017-09-15 19:54:34 +08:00
|
|
|
|
}
|
|
|
|
|
}
|