1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 11:42:54 +08:00

Expose playfield from IManiaHitObjectComposer

This commit is contained in:
smoogipoo 2020-05-14 18:34:51 +09:00
parent 35623e8513
commit 0ef3bae26a
5 changed files with 4 additions and 6 deletions

View File

@ -49,6 +49,6 @@ namespace osu.Game.Rulesets.Mania.Tests
public Column ColumnAt(Vector2 screenSpacePosition) => column;
public int TotalColumns => 1;
public ManiaPlayfield Playfield => null;
}
}

View File

@ -33,6 +33,6 @@ namespace osu.Game.Rulesets.Mania.Tests
public Column ColumnAt(Vector2 screenSpacePosition) => column;
public int TotalColumns => 1;
public ManiaPlayfield Playfield => null;
}
}

View File

@ -10,6 +10,6 @@ namespace osu.Game.Rulesets.Mania.Edit
{
Column ColumnAt(Vector2 screenSpacePosition);
int TotalColumns { get; }
ManiaPlayfield Playfield { get; }
}
}

View File

@ -42,8 +42,6 @@ namespace osu.Game.Rulesets.Mania.Edit
public IScrollingInfo ScrollingInfo => drawableRuleset.ScrollingInfo;
public int TotalColumns => Playfield.TotalColumns;
public override (Vector2 position, double time) GetSnappedPosition(Vector2 position, double time)
{
var hoc = Playfield.GetColumn(0).HitObjectContainer;

View File

@ -50,7 +50,7 @@ namespace osu.Game.Rulesets.Mania.Edit
maxColumn = obj.Column;
}
columnDelta = Math.Clamp(columnDelta, -minColumn, composer.TotalColumns - 1 - maxColumn);
columnDelta = Math.Clamp(columnDelta, -minColumn, composer.Playfield.TotalColumns - 1 - maxColumn);
foreach (var obj in SelectedHitObjects.OfType<ManiaHitObject>())
obj.Column += columnDelta;