1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 20:22:55 +08:00

Begin conversion

This commit is contained in:
Dean Herbert 2017-08-07 16:02:14 +09:00
parent b71caca131
commit 725a69d973
2 changed files with 13 additions and 5 deletions

View File

@ -16,14 +16,17 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
{
protected override IEnumerable<Type> ValidConversionTypes { get; } = new[] { typeof(IHasXPosition) };
protected override IEnumerable<CatchBaseHit> ConvertHitObject(HitObject original, Beatmap beatmap)
protected override IEnumerable<CatchBaseHit> ConvertHitObject(HitObject obj, Beatmap beatmap)
{
var catchHit = original as CatchBaseHit;
var distanceData = obj as IHasDistance;
var repeatsData = obj as IHasRepeats;
var endTimeData = obj as IHasEndTime;
var curveData = obj as IHasCurve;
yield return catchHit ?? new Fruit
yield return new Fruit
{
StartTime = original.StartTime,
Position = ((IHasXPosition)original).X / OsuPlayfield.BASE_SIZE.X
StartTime = obj.StartTime,
Position = ((IHasXPosition)obj).X / OsuPlayfield.BASE_SIZE.X
};
}
}

View File

@ -49,6 +49,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
{
Children = new Framework.Graphics.Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.Red,
},
new Pulp
{
RelativePositionAxes = Axes.Both,