Add mania direction to settings

This commit is contained in:
smoogipoo
2018-06-11 14:36:19 +09:00
parent 93696fb5e5
commit f49b7d6e16
12 changed files with 121 additions and 33 deletions

View File

@ -29,17 +29,16 @@ namespace osu.Game.Rulesets.UI.Scrolling
/// </summary>
protected readonly SortedList<MultiplierControlPoint> ControlPoints = new SortedList<MultiplierControlPoint>();
private readonly ScrollingDirection direction;
public readonly Bindable<ScrollingDirection> Direction = new Bindable<ScrollingDirection>();
private Cached initialStateCache = new Cached();
public ScrollingHitObjectContainer(ScrollingDirection direction)
public ScrollingHitObjectContainer()
{
this.direction = direction;
RelativeSizeAxes = Axes.Both;
TimeRange.ValueChanged += v => initialStateCache.Invalidate();
TimeRange.ValueChanged += _ => initialStateCache.Invalidate();
Direction.ValueChanged += _ => initialStateCache.Invalidate();
}
private ISpeedChangeVisualiser speedChangeVisualiser;
@ -100,7 +99,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
if (!initialStateCache.IsValid)
{
speedChangeVisualiser.ComputeInitialStates(Objects, direction, TimeRange, DrawSize);
speedChangeVisualiser.ComputeInitialStates(Objects, Direction, TimeRange, DrawSize);
initialStateCache.Validate();
}
}
@ -110,7 +109,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
base.UpdateAfterChildrenLife();
// We need to calculate this as soon as possible after lifetimes so that hitobjects get the final say in their positions
speedChangeVisualiser.UpdatePositions(AliveObjects, direction, Time.Current, TimeRange, DrawSize);
speedChangeVisualiser.UpdatePositions(AliveObjects, Direction, Time.Current, TimeRange, DrawSize);
}
}
}