mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Introduce IPlayfieldProvider
This commit is contained in:
parent
d0e57f7dd9
commit
ef96ceb4ab
@ -14,12 +14,12 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
|||||||
where T : ManiaHitObject
|
where T : ManiaHitObject
|
||||||
{
|
{
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private HitObjectComposer composer { get; set; }
|
private IPlayfieldProvider playfieldProvider { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private IScrollingInfo scrollingInfo { get; set; }
|
private IScrollingInfo scrollingInfo { get; set; }
|
||||||
|
|
||||||
protected ScrollingHitObjectContainer HitObjectContainer => ((ManiaPlayfield)composer.Playfield).GetColumn(HitObject.Column).HitObjectContainer;
|
protected ScrollingHitObjectContainer HitObjectContainer => ((ManiaPlayfield)playfieldProvider.Playfield).GetColumn(HitObject.Column).HitObjectContainer;
|
||||||
|
|
||||||
protected ManiaSelectionBlueprint(T hitObject)
|
protected ManiaSelectionBlueprint(T hitObject)
|
||||||
: base(hitObject)
|
: base(hitObject)
|
||||||
|
@ -415,7 +415,8 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Cached(typeof(HitObjectComposer))]
|
[Cached(typeof(HitObjectComposer))]
|
||||||
[Cached(typeof(IPositionSnapProvider))]
|
[Cached(typeof(IPositionSnapProvider))]
|
||||||
public abstract class HitObjectComposer : CompositeDrawable, IPositionSnapProvider
|
[Cached(typeof(IPlayfieldProvider))]
|
||||||
|
public abstract class HitObjectComposer : CompositeDrawable, IPositionSnapProvider, IPlayfieldProvider
|
||||||
{
|
{
|
||||||
protected HitObjectComposer()
|
protected HitObjectComposer()
|
||||||
{
|
{
|
||||||
|
12
osu.Game/Rulesets/Edit/IPlayfieldProvider.cs
Normal file
12
osu.Game/Rulesets/Edit/IPlayfieldProvider.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Game.Rulesets.UI;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Edit
|
||||||
|
{
|
||||||
|
public interface IPlayfieldProvider
|
||||||
|
{
|
||||||
|
Playfield Playfield { get; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user