Distance -> Duration.

This commit is contained in:
Dean Herbert
2017-04-05 13:52:53 +09:00
parent 3f20e2381f
commit 0e0ab6904d
4 changed files with 8 additions and 13 deletions

View File

@ -11,21 +11,16 @@ using osu.Game.Database;
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.