2017-06-09 01:43:48 +08:00
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
using osu.Game.Rulesets.Timing;
|
|
|
|
|
2017-06-09 15:20:55 +08:00
|
|
|
namespace osu.Game.Rulesets.Mania.Timing
|
2017-06-09 01:43:48 +08:00
|
|
|
{
|
2017-06-09 15:11:31 +08:00
|
|
|
public class ManiaSpeedAdjustmentContainer : SpeedAdjustmentContainer
|
2017-06-09 01:43:48 +08:00
|
|
|
{
|
|
|
|
private readonly ScrollingAlgorithm scrollingAlgorithm;
|
|
|
|
|
2017-06-09 15:57:17 +08:00
|
|
|
public ManiaSpeedAdjustmentContainer(MultiplierControlPoint timingSection, ScrollingAlgorithm scrollingAlgorithm)
|
2017-06-16 12:00:08 +08:00
|
|
|
: base(timingSection)
|
2017-06-09 01:43:48 +08:00
|
|
|
{
|
|
|
|
this.scrollingAlgorithm = scrollingAlgorithm;
|
|
|
|
}
|
|
|
|
|
2017-08-04 19:22:53 +08:00
|
|
|
protected override ScrollingContainer CreateScrollingContainer()
|
2017-06-09 01:43:48 +08:00
|
|
|
{
|
|
|
|
switch (scrollingAlgorithm)
|
|
|
|
{
|
|
|
|
default:
|
2017-08-04 19:22:53 +08:00
|
|
|
return base.CreateScrollingContainer();
|
2017-06-09 01:43:48 +08:00
|
|
|
case ScrollingAlgorithm.Gravity:
|
2017-08-04 19:22:53 +08:00
|
|
|
return new GravityScrollingContainer(ControlPoint);
|
2017-06-09 01:43:48 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|