From abf6dbc3079d59c5fc7f49f8224532b4a01e7ca9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 5 Apr 2017 11:48:30 +0900 Subject: [PATCH] BarLine : TaikoHitObject. --- osu.Game.Modes.Taiko/Objects/BarLine.cs | 19 +------------------ .../Objects/Drawables/DrawableBarLine.cs | 8 ++++---- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/BarLine.cs b/osu.Game.Modes.Taiko/Objects/BarLine.cs index a6eceb2e48..ae3c03de5e 100644 --- a/osu.Game.Modes.Taiko/Objects/BarLine.cs +++ b/osu.Game.Modes.Taiko/Objects/BarLine.cs @@ -1,26 +1,9 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Beatmaps.Timing; -using osu.Game.Database; - namespace osu.Game.Modes.Taiko.Objects { - public class BarLine + public class BarLine : TaikoHitObject { - /// - /// 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; - - public void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty) - { - PreEmpt = TaikoHitObject.BASE_SCROLL_TIME / difficulty.SliderMultiplier * timing.BeatLengthAt(StartTime) * timing.SpeedMultiplierAt(StartTime) / 1000; - } } } diff --git a/osu.Game.Modes.Taiko/Objects/Drawables/DrawableBarLine.cs b/osu.Game.Modes.Taiko/Objects/Drawables/DrawableBarLine.cs index 6567975796..2ff1f2d9e0 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawables/DrawableBarLine.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawables/DrawableBarLine.cs @@ -62,14 +62,14 @@ namespace osu.Game.Modes.Taiko.Objects.Drawables { base.LoadComplete(); - LifetimeStart = BarLine.StartTime - BarLine.PreEmpt * 2; - LifetimeEnd = BarLine.StartTime + BarLine.PreEmpt; + LifetimeStart = BarLine.StartTime - BarLine.ScrollTime * 2; + LifetimeEnd = BarLine.StartTime + BarLine.ScrollTime; Delay(BarLine.StartTime - Time.Current); - FadeOut(base_fadeout_time * BarLine.PreEmpt / 1000); + FadeOut(base_fadeout_time * BarLine.ScrollTime / 1000); } - private void updateScrollPosition(double time) => MoveToX((float)((BarLine.StartTime - time) / BarLine.PreEmpt)); + private void updateScrollPosition(double time) => MoveToX((float)((BarLine.StartTime - time) / BarLine.ScrollTime)); protected override void Update() {