2017-06-02 18:27:00 +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.Framework.Graphics;
|
2017-06-02 19:17:44 +08:00
|
|
|
using osu.Game.Rulesets.Timing;
|
|
|
|
using osu.Game.Rulesets.Timing.Drawables;
|
2017-06-02 18:27:00 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Timing.Drawables
|
|
|
|
{
|
|
|
|
public class DrawableManiaTimingChange : DrawableTimingChange
|
|
|
|
{
|
|
|
|
public DrawableManiaTimingChange(TimingChange timingChange)
|
|
|
|
: base(timingChange, Axes.Y)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void UpdateAfterChildren()
|
|
|
|
{
|
|
|
|
base.UpdateAfterChildren();
|
|
|
|
|
|
|
|
var parent = Parent as IHasTimeSpan;
|
|
|
|
|
|
|
|
if (parent == null)
|
|
|
|
return;
|
|
|
|
|
2017-06-02 18:36:47 +08:00
|
|
|
// This is very naive and can be improved, but is adequate for now
|
2017-06-02 18:27:00 +08:00
|
|
|
LifetimeStart = TimingChange.Time - parent.TimeSpan.Y;
|
|
|
|
LifetimeEnd = TimingChange.Time + Content.RelativeCoordinateSpace.Y * 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|