1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Make hold notes utilize RelativeChildOffset for tick positionings.

This commit is contained in:
smoogipooo 2017-06-06 15:57:30 +09:00
parent e3d10fc4d3
commit 5104e65bcd

View File

@ -56,6 +56,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
tickContainer = new Container<DrawableHoldNoteTick>
{
RelativeSizeAxes = Axes.Both,
RelativeChildOffset = new Vector2(0, (float)HitObject.StartTime),
RelativeChildSize = new Vector2(1, (float)HitObject.Duration)
},
head = new DrawableHeadNote(this, key)
@ -77,9 +78,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
HoldStartTime = () => holdStartTime
};
// To make the ticks relative to ourselves we need to offset them backwards
drawableTick.Y -= (float)HitObject.StartTime;
tickContainer.Add(drawableTick);
AddNested(drawableTick);
}