1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-19 19:43:05 +08:00
osu-lazer/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableBarLine.cs

65 lines
1.8 KiB
C#
Raw Normal View History

2018-01-05 19:21:19 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-03-21 19:39:18 +08:00
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
2017-03-21 19:39:18 +08:00
using OpenTK;
using osu.Game.Rulesets.Objects.Drawables;
2017-03-21 19:39:18 +08:00
2017-04-18 15:05:58 +08:00
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
2017-03-21 19:39:18 +08:00
{
/// <summary>
/// A line that scrolls alongside hit objects in the playfield and visualises control points.
/// </summary>
public class DrawableBarLine : DrawableHitObject<TaikoHitObject>
2017-03-21 19:39:18 +08:00
{
2017-04-03 09:04:13 +08:00
/// <summary>
/// The width of the line tracker.
/// </summary>
private const float tracker_width = 2f;
/// <summary>
/// Fade out time calibrated to a pre-empt of 1000ms.
/// </summary>
private const float base_fadeout_time = 100f;
2017-03-21 19:39:18 +08:00
/// <summary>
2017-04-02 01:06:58 +08:00
/// The visual line tracker.
2017-03-21 19:39:18 +08:00
/// </summary>
protected Box Tracker;
/// <summary>
2017-04-02 01:06:58 +08:00
/// The bar line.
2017-03-21 19:39:18 +08:00
/// </summary>
protected readonly BarLine BarLine;
public DrawableBarLine(BarLine barLine)
: base(barLine)
2017-03-21 19:39:18 +08:00
{
BarLine = barLine;
2017-08-09 09:54:00 +08:00
Anchor = Anchor.CentreLeft;
Origin = Anchor.Centre;
2017-03-21 19:39:18 +08:00
RelativeSizeAxes = Axes.Y;
2017-04-03 09:04:13 +08:00
Width = tracker_width;
2017-03-21 19:39:18 +08:00
InternalChildren = new[]
2017-03-21 19:39:18 +08:00
{
Tracker = new Box
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
EdgeSmoothness = new Vector2(0.5f, 0),
Alpha = 0.75f
}
};
}
protected override void UpdateState(ArmedState state)
2017-03-21 19:39:18 +08:00
{
}
}
2017-08-21 14:35:16 +08:00
}