From 0e0ab6904d3b00cbd3cdca25ce7dfaf1d1d212f0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 5 Apr 2017 13:52:53 +0900 Subject: [PATCH] Distance -> Duration. --- .../Beatmaps/TaikoBeatmapConverter.cs | 4 ++-- .../Objects/Drawables/DrawableDrumRoll.cs | 2 +- osu.Game.Modes.Taiko/Objects/DrumRoll.cs | 11 +++-------- osu.Game.Modes.Taiko/Objects/Swell.cs | 4 ++-- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs index 42e21e43cf..3b77610910 100644 --- a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs +++ b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs @@ -112,7 +112,7 @@ private IEnumerable convertHitObject(HitObject obj, Beatmap beat StartTime = obj.StartTime, Sample = obj.Sample, IsStrong = strong, - Distance = distance, + Duration = taikoDuration, TickRate = beatmap.BeatmapInfo.Difficulty.SliderTickRate == 3 ? 3 : 4, }; } @@ -126,7 +126,7 @@ private IEnumerable convertHitObject(HitObject obj, Beatmap beat StartTime = obj.StartTime, Sample = obj.Sample, IsStrong = strong, - EndTime = endTimeData.EndTime, + Duration = endTimeData.Duration, RequiredHits = (int)Math.Max(1, endTimeData.Duration / 1000 * hitMultiplier), }; } diff --git a/osu.Game.Modes.Taiko/Objects/Drawables/DrawableDrumRoll.cs b/osu.Game.Modes.Taiko/Objects/Drawables/DrawableDrumRoll.cs index c21894c56b..0a0098dd34 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawables/DrawableDrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawables/DrawableDrumRoll.cs @@ -34,7 +34,7 @@ public DrawableDrumRoll(DrumRoll drumRoll) { var newTick = new DrawableDrumRollTick(tick) { - X = (float)((tick.StartTime - HitObject.StartTime) / drumRoll.Duration) + X = (float)((tick.StartTime - HitObject.StartTime) / HitObject.Duration) }; newTick.OnJudgement += onTickJudgement; diff --git a/osu.Game.Modes.Taiko/Objects/DrumRoll.cs b/osu.Game.Modes.Taiko/Objects/DrumRoll.cs index f5e561029f..69864bc422 100644 --- a/osu.Game.Modes.Taiko/Objects/DrumRoll.cs +++ b/osu.Game.Modes.Taiko/Objects/DrumRoll.cs @@ -11,21 +11,16 @@ namespace osu.Game.Modes.Taiko.Objects { - public class DrumRoll : TaikoHitObject, IHasDistance + public class DrumRoll : TaikoHitObject, IHasEndTime { /// /// Drum roll distance that results in a duration of 1 speed-adjusted beat length. /// private const float base_distance = 100; - public double EndTime => StartTime + Distance / Velocity; + public double EndTime => StartTime + Duration; - public double Duration => EndTime - StartTime; - - /// - /// Raw length of the drum roll in positional length units. - /// - public double Distance { get; set; } + public double Duration { get; set; } /// /// Velocity of the drum roll in positional length units per millisecond. diff --git a/osu.Game.Modes.Taiko/Objects/Swell.cs b/osu.Game.Modes.Taiko/Objects/Swell.cs index f55416509a..97101ea797 100644 --- a/osu.Game.Modes.Taiko/Objects/Swell.cs +++ b/osu.Game.Modes.Taiko/Objects/Swell.cs @@ -7,9 +7,9 @@ namespace osu.Game.Modes.Taiko.Objects { public class Swell : TaikoHitObject, IHasEndTime { - public double EndTime { get; set; } + public double EndTime => StartTime + Duration; - public double Duration => EndTime - StartTime; + public double Duration { get; set; } /// /// The number of hits required to complete the swell successfully.