1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Output stacked positions for conversion values

This commit is contained in:
smoogipoo 2019-08-07 19:33:16 +09:00
parent 6df671ff7f
commit 994c1f21ec

View File

@ -8,7 +8,6 @@ using osu.Framework.MathUtils;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.UI;
using osu.Game.Tests.Beatmaps;
namespace osu.Game.Rulesets.Osu.Tests
@ -31,22 +30,22 @@ namespace osu.Game.Rulesets.Osu.Tests
{
case Slider slider:
foreach (var nested in slider.NestedHitObjects)
yield return createConvertValue(nested);
yield return createConvertValue((OsuHitObject)nested);
break;
default:
yield return createConvertValue(hitObject);
yield return createConvertValue((OsuHitObject)hitObject);
break;
}
ConvertValue createConvertValue(HitObject obj) => new ConvertValue
ConvertValue createConvertValue(OsuHitObject obj) => new ConvertValue
{
StartTime = obj.StartTime,
EndTime = (obj as IHasEndTime)?.EndTime ?? obj.StartTime,
X = (obj as IHasPosition)?.X ?? OsuPlayfield.BASE_SIZE.X / 2,
Y = (obj as IHasPosition)?.Y ?? OsuPlayfield.BASE_SIZE.Y / 2,
X = obj.StackedPosition.X,
Y = obj.StackedPosition.Y
};
}