Fix scroll direction not applying to nested hitobjects

This commit is contained in:
smoogipoo 2018-06-08 15:29:08 +09:00
parent c933dd4069
commit 5c8bea82f8

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Linq;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.UI.Scrolling;
@ -23,6 +24,12 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
Anchor = value == ScrollingDirection.Up ? Anchor.TopCentre : Anchor.BottomCentre;
Origin = Anchor;
if (!HasNestedHitObjects)
return;
foreach (var obj in NestedHitObjects.OfType<DrawableManiaHitObject>())
obj.Direction = value;
}
}
}