2018-01-05 11:21:19 +00:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-03-02 09:45:20 +00:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2018-01-25 09:52:03 +00:00
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Beatmaps.ControlPoints;
|
|
|
|
|
|
2017-04-18 07:05:58 +00:00
|
|
|
|
namespace osu.Game.Rulesets.Osu.Objects
|
2017-02-12 19:38:05 +00:00
|
|
|
|
{
|
|
|
|
|
public class SliderTick : OsuHitObject
|
|
|
|
|
{
|
2018-01-23 04:58:43 +00:00
|
|
|
|
public int SpanIndex { get; set; }
|
2018-01-29 11:03:22 +00:00
|
|
|
|
public double SpanStartTime { get; set; }
|
2018-01-25 09:52:03 +00:00
|
|
|
|
|
|
|
|
|
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
|
|
|
|
|
{
|
|
|
|
|
base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
|
|
|
|
|
|
2018-01-29 11:03:22 +00:00
|
|
|
|
double offset;
|
|
|
|
|
|
|
|
|
|
if (SpanIndex > 0)
|
|
|
|
|
// Adding 200 to include the offset stable used.
|
|
|
|
|
// This is so on repeats ticks don't appear too late to be visually processed by the player.
|
|
|
|
|
offset = 200;
|
|
|
|
|
else
|
|
|
|
|
offset = TimeFadein * 0.66f;
|
|
|
|
|
|
|
|
|
|
TimePreempt = (StartTime - SpanStartTime) / 2 + offset;
|
2018-01-25 09:52:03 +00:00
|
|
|
|
}
|
2017-02-12 19:38:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|