mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 17:13:06 +08:00
Legacy mania hit objects don't have a "column", this should be determined by the beatmap converter.
This commit is contained in:
parent
4a60e9299e
commit
d04353aed0
@ -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)
|
||||
{
|
||||
|
@ -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; }
|
||||
}
|
||||
|
@ -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
|
||||
};
|
||||
}
|
||||
|
@ -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; }
|
||||
}
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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" />
|
||||
|
Loading…
Reference in New Issue
Block a user