1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-06 13:47:21 +08:00

31 lines
1.0 KiB
C#
Raw Normal View History

2018-01-05 20:21:19 +09:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-03-02 18:45:20 +09:00
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2018-01-25 10:52:03 +01:00
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
2017-04-18 16:05:58 +09:00
namespace osu.Game.Rulesets.Osu.Objects
2017-02-12 20:38:05 +01:00
{
public class SliderTick : OsuHitObject
{
2018-01-23 13:58:43 +09:00
public int SpanIndex { get; set; }
public double SpanStartTime { get; set; }
2018-01-25 10:52:03 +01:00
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
{
base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
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 10:52:03 +01:00
}
2017-02-12 20:38:05 +01:00
}
}