mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 01:43:15 +08:00
Properly set starting lifetime for mania hit objects.
This commit is contained in:
parent
43f73c298f
commit
d66f114b5b
@ -6,6 +6,7 @@ using OpenTK.Input;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Rulesets.Mania.Judgements;
|
||||
using osu.Game.Rulesets.Mania.UI;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
@ -32,6 +33,13 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
Y = (float)HitObject.StartTime;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
LifetimeStart = HitObject.StartTime - ManiaPlayfield.TIME_SPAN_MAX;
|
||||
}
|
||||
|
||||
public override Color4 AccentColour
|
||||
{
|
||||
get { return base.AccentColour; }
|
||||
|
@ -31,9 +31,9 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
public const float HIT_TARGET_POSITION = 50;
|
||||
|
||||
private const float time_span_default = 1500;
|
||||
private const float time_span_min = 10;
|
||||
private const float time_span_max = 50000;
|
||||
private const float time_span_step = 200;
|
||||
public const float TIME_SPAN_MIN = 50;
|
||||
public const float TIME_SPAN_MAX = 10000;
|
||||
private const float time_span_step = 50;
|
||||
|
||||
/// <summary>
|
||||
/// Default column keys, expanding outwards from the middle as more column are added.
|
||||
@ -243,7 +243,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
return;
|
||||
timeSpan = value;
|
||||
|
||||
timeSpan = MathHelper.Clamp(timeSpan, time_span_min, time_span_max);
|
||||
timeSpan = MathHelper.Clamp(timeSpan, TIME_SPAN_MIN, TIME_SPAN_MAX);
|
||||
|
||||
barLineContainer.TimeSpan = new Vector2(1, value);
|
||||
Columns.ForEach(c => c.TimeSpan = value);
|
||||
|
Loading…
Reference in New Issue
Block a user