Make TimeSpan a double again.

This commit is contained in:
smoogipooo
2017-06-07 18:42:30 +09:00
parent a07f6801da
commit 7aee8ee547
6 changed files with 14 additions and 14 deletions

View File

@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Mania.Timing.Drawables
return;
// This is very naive and can be improved, but is adequate for now
LifetimeStart = TimingChange.Time - parent.TimeSpan.Y;
LifetimeStart = TimingChange.Time - parent.TimeSpan;
LifetimeEnd = TimingChange.Time + Content.RelativeChildSize.Y * 2;
}
}

View File

@ -185,10 +185,10 @@ namespace osu.Game.Rulesets.Mania.UI
}
}
public float TimeSpan
public double TimeSpan
{
get { return timingChanges.TimeSpan.Y; }
set { timingChanges.TimeSpan = new Vector2(1, value); }
get { return timingChanges.TimeSpan; }
set { timingChanges.TimeSpan = value; }
}
public void Add(DrawableTimingChange timingChange) => timingChanges.Add(timingChange);

View File

@ -30,10 +30,10 @@ namespace osu.Game.Rulesets.Mania.UI
{
public const float HIT_TARGET_POSITION = 50;
private const float time_span_default = 1500;
public const float TIME_SPAN_MIN = 50;
public const float TIME_SPAN_MAX = 10000;
private const float time_span_step = 50;
private const double time_span_default = 1500;
public const double TIME_SPAN_MIN = 50;
public const double TIME_SPAN_MAX = 10000;
private const double time_span_step = 50;
/// <summary>
/// Default column keys, expanding outwards from the middle as more column are added.
@ -230,11 +230,11 @@ namespace osu.Game.Rulesets.Mania.UI
return false;
}
private float timeSpan;
private double timeSpan;
/// <summary>
/// The amount of time which the length of the playfield spans.
/// </summary>
public float TimeSpan
public double TimeSpan
{
get { return timeSpan; }
set
@ -245,7 +245,7 @@ namespace osu.Game.Rulesets.Mania.UI
timeSpan = MathHelper.Clamp(timeSpan, TIME_SPAN_MIN, TIME_SPAN_MAX);
barLineContainer.TimeSpan = new Vector2(1, value);
barLineContainer.TimeSpan = value;
Columns.ForEach(c => c.TimeSpan = value);
}
}