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-12 14:20:34 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A <see cref="DrawableTimingSection"/> which scrolls relative to the control point start time.
|
|
|
|
|
/// </summary>
|
2017-06-09 15:11:31 +08:00
|
|
|
|
internal class BasicScrollingDrawableTimingSection : DrawableTimingSection
|
2017-06-09 01:43:48 +08:00
|
|
|
|
{
|
2017-06-12 14:20:34 +08:00
|
|
|
|
private readonly MultiplierControlPoint controlPoint;
|
2017-06-09 01:43:48 +08:00
|
|
|
|
|
2017-06-12 14:20:34 +08:00
|
|
|
|
public BasicScrollingDrawableTimingSection(MultiplierControlPoint controlPoint)
|
2017-06-09 01:43:48 +08:00
|
|
|
|
{
|
2017-06-12 14:20:34 +08:00
|
|
|
|
this.controlPoint = controlPoint;
|
2017-06-09 01:43:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Update()
|
|
|
|
|
{
|
|
|
|
|
base.Update();
|
|
|
|
|
|
2017-06-12 14:20:34 +08:00
|
|
|
|
Y = (float)(controlPoint.StartTime - Time.Current);
|
2017-06-09 01:43:48 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|