Distance -> Duration.

This commit is contained in:
Dean Herbert 2017-04-05 13:52:53 +09:00
parent 3f20e2381f
commit 0e0ab6904d
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
4 changed files with 8 additions and 13 deletions

View File

@ -112,7 +112,7 @@ private IEnumerable<TaikoHitObject> 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<TaikoHitObject> 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),
};
}

View File

@ -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;

View File

@ -11,21 +11,16 @@
namespace osu.Game.Modes.Taiko.Objects
{
public class DrumRoll : TaikoHitObject, IHasDistance
public class DrumRoll : TaikoHitObject, IHasEndTime
{
/// <summary>
/// Drum roll distance that results in a duration of 1 speed-adjusted beat length.
/// </summary>
private const float base_distance = 100;
public double EndTime => StartTime + Distance / Velocity;
public double EndTime => StartTime + Duration;
public double Duration => EndTime - StartTime;
/// <summary>
/// Raw length of the drum roll in positional length units.
/// </summary>
public double Distance { get; set; }
public double Duration { get; set; }
/// <summary>
/// Velocity of the drum roll in positional length units per millisecond.

View File

@ -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; }
/// <summary>
/// The number of hits required to complete the swell successfully.