1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 16:37:26 +08:00
osu-lazer/osu.Game/Rulesets/Objects/IBarLine.cs
Bartłomiej Dach 9323df26a1 Decouple bar line hitobjects from generator
Introduce an IBarLine interface, which together with generic constraints
helps decouple BarLineGenerator from the actual hitobject types it
creates. Thanks to this, all rulesets that want bar lines can provide
an implementation of IBarLine that also derives from the base hitobject
class.

This allows DrawableBarLines in taiko and mania to be migrated back to
DrawableTaikoHitObject and DrawableManiaHitObject base classes
respectively. This in turn resolves #6215 without code duplication,
since the missing anchoring application is now done in mania's
DrawableBarLine through deriving from DrawableManiaHitObject.
2019-09-25 00:36:27 +02:00

23 lines
700 B
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Rulesets.Objects
{
/// <summary>
/// Interface for bar line hitobjects.
/// Used to decouple bar line generation from ruleset-specific rendering/drawing hierarchies.
/// </summary>
public interface IBarLine
{
/// <summary>
/// The time position of the bar.
/// </summary>
double StartTime { set; }
/// <summary>
/// Whether this bar line is a prominent beat (based on time signature of beatmap).
/// </summary>
bool Major { set; }
}
}