1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-17 05:52:54 +08:00
osu-lazer/osu.Game/Beatmaps/BeatmapProcessor.cs

37 lines
955 B
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2018-04-13 17:19:50 +08:00
using System.Linq;
using osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Beatmaps
{
/// <summary>
/// Provides functionality to alter a <see cref="IBeatmap"/> after it has been converted.
2018-04-13 17:19:50 +08:00
/// </summary>
public class BeatmapProcessor : IBeatmapProcessor
2018-04-13 17:19:50 +08:00
{
public IBeatmap Beatmap { get; }
public BeatmapProcessor(IBeatmap beatmap)
{
Beatmap = beatmap;
}
public virtual void PreProcess()
2018-04-13 17:19:50 +08:00
{
IHasComboInformation? lastObj = null;
foreach (var obj in Beatmap.HitObjects.OfType<IHasComboInformation>())
2018-04-13 17:19:50 +08:00
{
obj.UpdateComboInformation(lastObj);
2018-04-13 17:19:50 +08:00
lastObj = obj;
}
}
public virtual void PostProcess()
{
}
2018-04-13 17:19:50 +08:00
}
}