mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Add ruleset templates structure
This commit is contained in:
@ -0,0 +1,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.Objects;
|
||||
using osu.Game.Rulesets.EmptyScrolling.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,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user