forked from ppy/osu
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmptyScrollingBeatmapConverter.cs
More file actions
32 lines (28 loc) · 1.2 KB
/
Copy pathEmptyScrollingBeatmapConverter.cs
File metadata and controls
32 lines (28 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// 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.
using System.Collections.Generic;
using System.Threading;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.EmptyScrolling.Objects;
using osu.Game.Rulesets.Objects;
namespace osu.Game.Rulesets.EmptyScrolling.Beatmaps
{
public class EmptyScrollingBeatmapConverter : BeatmapConverter<EmptyScrollingHitObject>
{
public EmptyScrollingBeatmapConverter(IBeatmap beatmap, Ruleset ruleset)
: base(beatmap, ruleset)
{
}
// todo: Check for conversion types that should be supported (ie. Beatmap.HitObjects.Any(h => h is IHasXPosition))
// https://github.com/ppy/osu/tree/master/osu.Game/Rulesets/Objects/Types
public override bool CanConvert() => true;
protected override IEnumerable<EmptyScrollingHitObject> ConvertHitObject(HitObject original, IBeatmap beatmap, CancellationToken cancellationToken)
{
yield return new EmptyScrollingHitObject
{
Samples = original.Samples,
StartTime = original.StartTime,
};
}
}
}