mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 20:22:55 +08:00
Expose playfield from IManiaHitObjectComposer
This commit is contained in:
parent
35623e8513
commit
0ef3bae26a
@ -49,6 +49,6 @@ namespace osu.Game.Rulesets.Mania.Tests
|
|||||||
|
|
||||||
public Column ColumnAt(Vector2 screenSpacePosition) => column;
|
public Column ColumnAt(Vector2 screenSpacePosition) => column;
|
||||||
|
|
||||||
public int TotalColumns => 1;
|
public ManiaPlayfield Playfield => null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,6 @@ namespace osu.Game.Rulesets.Mania.Tests
|
|||||||
|
|
||||||
public Column ColumnAt(Vector2 screenSpacePosition) => column;
|
public Column ColumnAt(Vector2 screenSpacePosition) => column;
|
||||||
|
|
||||||
public int TotalColumns => 1;
|
public ManiaPlayfield Playfield => null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,6 @@ namespace osu.Game.Rulesets.Mania.Edit
|
|||||||
{
|
{
|
||||||
Column ColumnAt(Vector2 screenSpacePosition);
|
Column ColumnAt(Vector2 screenSpacePosition);
|
||||||
|
|
||||||
int TotalColumns { get; }
|
ManiaPlayfield Playfield { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,6 @@ namespace osu.Game.Rulesets.Mania.Edit
|
|||||||
|
|
||||||
public IScrollingInfo ScrollingInfo => drawableRuleset.ScrollingInfo;
|
public IScrollingInfo ScrollingInfo => drawableRuleset.ScrollingInfo;
|
||||||
|
|
||||||
public int TotalColumns => Playfield.TotalColumns;
|
|
||||||
|
|
||||||
public override (Vector2 position, double time) GetSnappedPosition(Vector2 position, double time)
|
public override (Vector2 position, double time) GetSnappedPosition(Vector2 position, double time)
|
||||||
{
|
{
|
||||||
var hoc = Playfield.GetColumn(0).HitObjectContainer;
|
var hoc = Playfield.GetColumn(0).HitObjectContainer;
|
||||||
|
@ -50,7 +50,7 @@ namespace osu.Game.Rulesets.Mania.Edit
|
|||||||
maxColumn = obj.Column;
|
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>())
|
foreach (var obj in SelectedHitObjects.OfType<ManiaHitObject>())
|
||||||
obj.Column += columnDelta;
|
obj.Column += columnDelta;
|
||||||
|
Loading…
Reference in New Issue
Block a user