Reduce implementation overhead in actually positioning hitobjects and making them scroll.

This commit is contained in:
smoogipooo
2017-08-07 16:02:38 +09:00
parent 068dfcb19a
commit a3efca9c35
8 changed files with 32 additions and 27 deletions

View File

@ -37,7 +37,6 @@ namespace osu.Game.Rulesets.Timing
/// <summary>
/// Axes which the content of this container will scroll through.
/// </summary>
/// <returns></returns>
public Axes ScrollingAxes { get; internal set; }
public readonly MultiplierControlPoint ControlPoint;
@ -83,7 +82,12 @@ namespace osu.Game.Rulesets.Timing
public override void Add(DrawableHitObject drawable)
{
var scrollingHitObject = drawable as IScrollingHitObject;
scrollingHitObject?.LifetimeOffset.BindTo(VisibleTimeRange);
if (scrollingHitObject != null)
{
scrollingHitObject.LifetimeOffset.BindTo(VisibleTimeRange);
scrollingHitObject.ScrollingAxes = ScrollingAxes;
}
base.Add(drawable);
}