1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 15:33:21 +08:00

Legacy mania hit objects don't have a "column", this should be determined by the beatmap converter.

This commit is contained in:
smoogipooo 2017-04-18 11:13:11 +09:00
parent 4a60e9299e
commit d04353aed0
7 changed files with 10 additions and 24 deletions

View File

@ -12,7 +12,7 @@ namespace osu.Game.Modes.Mania.Beatmaps
{
internal class ManiaBeatmapConverter : BeatmapConverter<ManiaBaseHit>
{
public override IEnumerable<Type> ValidConversionTypes { get; } = new[] { typeof(IHasColumn) };
public override IEnumerable<Type> ValidConversionTypes { get; } = new[] { typeof(IHasXPosition) };
public override Beatmap<ManiaBaseHit> Convert(Beatmap original)
{

View File

@ -8,9 +8,9 @@ namespace osu.Game.Modes.Objects.Legacy.Mania
/// <summary>
/// Legacy osu!mania Hit-type, used for parsing Beatmaps.
/// </summary>
internal sealed class Hit : HitObject, IHasColumn, IHasCombo
internal sealed class Hit : HitObject, IHasXPosition, IHasCombo
{
public int Column { get; set; }
public float X { get; set; }
public bool NewCombo { get; set; }
}

View File

@ -16,6 +16,7 @@ namespace osu.Game.Modes.Objects.Legacy.Mania
{
return new Hit
{
X = position.X,
NewCombo = newCombo,
};
}
@ -24,6 +25,7 @@ namespace osu.Game.Modes.Objects.Legacy.Mania
{
return new Slider
{
X = position.X,
NewCombo = newCombo,
ControlPoints = controlPoints,
Distance = length,
@ -36,6 +38,7 @@ namespace osu.Game.Modes.Objects.Legacy.Mania
{
return new Spinner
{
X = position.X,
EndTime = endTime
};
}

View File

@ -8,9 +8,9 @@ namespace osu.Game.Modes.Objects.Legacy.Mania
/// <summary>
/// Legacy osu!mania Slider-type, used for parsing Beatmaps.
/// </summary>
internal sealed class Slider : CurvedHitObject, IHasColumn, IHasCombo
internal sealed class Slider : CurvedHitObject, IHasXPosition, IHasCombo
{
public int Column { get; set; }
public float X { get; set; }
public bool NewCombo { get; set; }
}

View File

@ -8,12 +8,12 @@ namespace osu.Game.Modes.Objects.Legacy.Mania
/// <summary>
/// Legacy osu!mania Spinner-type, used for parsing Beatmaps.
/// </summary>
internal sealed class Spinner : HitObject, IHasEndTime, IHasColumn
internal sealed class Spinner : HitObject, IHasEndTime, IHasXPosition
{
public double EndTime { get; set; }
public double Duration => EndTime - StartTime;
public int Column { get; set; }
public float X { get; set; }
}
}

View File

@ -1,16 +0,0 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Modes.Objects.Types
{
/// <summary>
/// A HitObject that lies in a column space.
/// </summary>
public interface IHasColumn
{
/// <summary>
/// The column which this HitObject lies in.
/// </summary>
int Column { get; }
}
}

View File

@ -117,7 +117,6 @@
<Compile Include="Modes\Objects\Legacy\Taiko\HitObjectParser.cs" />
<Compile Include="Modes\Objects\Legacy\Taiko\Slider.cs" />
<Compile Include="Modes\Objects\Legacy\Taiko\Spinner.cs" />
<Compile Include="Modes\Objects\Types\IHasColumn.cs" />
<Compile Include="Modes\Objects\Types\IHasXPosition.cs" />
<Compile Include="Modes\Objects\Types\IHasYPosition.cs" />
<Compile Include="Modes\Replays\Replay.cs" />