From b05a12372a2ef916ad81a0103563f84bad3c1681 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 21 Mar 2017 18:44:07 +0900 Subject: [PATCH] Add base barline. --- osu.Game.Modes.Taiko/Objects/BarLine.cs | 28 +++++++++++++++++++ .../osu.Game.Modes.Taiko.csproj | 1 + 2 files changed, 29 insertions(+) create mode 100644 osu.Game.Modes.Taiko/Objects/BarLine.cs diff --git a/osu.Game.Modes.Taiko/Objects/BarLine.cs b/osu.Game.Modes.Taiko/Objects/BarLine.cs new file mode 100644 index 0000000000..6c79d2172c --- /dev/null +++ b/osu.Game.Modes.Taiko/Objects/BarLine.cs @@ -0,0 +1,28 @@ +using osu.Game.Beatmaps.Timing; +using osu.Game.Database; + +namespace osu.Game.Modes.Taiko.Objects +{ + public class BarLine + { + /// + /// The start time of the control point this bar line represents. + /// + public double StartTime; + + /// + /// The time to scroll in the bar line. + /// + public double PreEmpt; + + /// + /// Whether this is a major bar line (affects display). + /// + public bool IsMajor; + + public void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty) + { + PreEmpt = 600 / (timing.SliderVelocityAt(StartTime) * difficulty.SliderMultiplier) * 1000; + } + } +} diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj index 7ea6dfeadb..39b18e23dc 100644 --- a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj +++ b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj @@ -50,6 +50,7 @@ +