2018-04-13 17:19:50 +08:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Configuration;
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.UI.Scrolling
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// A type of <see cref="Playfield"/> specialized towards scrolling <see cref="DrawableHitObject"/>s.
|
|
|
|
/// </summary>
|
2018-11-07 16:24:05 +08:00
|
|
|
public abstract class ScrollingPlayfield : Playfield
|
2018-04-13 17:19:50 +08:00
|
|
|
{
|
2018-11-06 14:46:36 +08:00
|
|
|
protected readonly IBindable<ScrollingDirection> Direction = new Bindable<ScrollingDirection>();
|
|
|
|
|
|
|
|
[Resolved]
|
|
|
|
private IScrollingInfo scrollingInfo { get; set; }
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
2018-11-06 14:46:36 +08:00
|
|
|
Direction.BindTo(scrollingInfo.Direction);
|
2018-04-13 17:19:50 +08:00
|
|
|
}
|
|
|
|
|
2018-11-06 14:46:36 +08:00
|
|
|
protected sealed override HitObjectContainer CreateHitObjectContainer() => new ScrollingHitObjectContainer();
|
2018-04-13 17:19:50 +08:00
|
|
|
}
|
|
|
|
}
|