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

Add back missing code

This commit is contained in:
Dean Herbert 2018-01-04 18:33:57 +09:00
parent f28053b2fc
commit 22fc9601ee

View File

@ -47,6 +47,11 @@ namespace osu.Game.Rulesets.Catch.UI
{ {
var screenSpacePosition = fruit.ScreenSpaceDrawQuad.Centre; var screenSpacePosition = fruit.ScreenSpaceDrawQuad.Centre;
// remove the fruit from its current parent.
// todo: make this less ugly, somehow.
(fruit.Parent as Container<DrawableHitObject>)?.Remove(fruit);
(fruit.Parent as Container)?.Remove(fruit);
fruit.RelativePositionAxes = Axes.None; fruit.RelativePositionAxes = Axes.None;
fruit.Position = new Vector2(MovableCatcher.ToLocalSpace(screenSpacePosition).X - MovableCatcher.DrawSize.X / 2, 0); fruit.Position = new Vector2(MovableCatcher.ToLocalSpace(screenSpacePosition).X - MovableCatcher.DrawSize.X / 2, 0);