2019-01-24 08:43:03 +00:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2018-01-25 09:52:03 +00:00
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Beatmaps.ControlPoints;
|
2018-08-02 11:36:38 +00:00
|
|
|
|
using osu.Game.Rulesets.Judgements;
|
|
|
|
|
using osu.Game.Rulesets.Osu.Judgements;
|
2019-09-06 06:24:00 +00:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
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-04-13 09:19:50 +00:00
|
|
|
|
|
2021-10-01 05:56:42 +00:00
|
|
|
|
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, IBeatmapDifficultyInfo difficulty)
|
2018-01-25 09:52:03 +00:00
|
|
|
|
{
|
|
|
|
|
base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2018-01-29 11:03:22 +00:00
|
|
|
|
double offset;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2018-01-29 11:03:22 +00:00
|
|
|
|
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
|
2022-09-26 05:11:59 +00:00
|
|
|
|
offset = TimePreempt * 0.66f;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2018-01-29 11:03:22 +00:00
|
|
|
|
TimePreempt = (StartTime - SpanStartTime) / 2 + offset;
|
2018-01-25 09:52:03 +00:00
|
|
|
|
}
|
2018-08-02 11:36:38 +00:00
|
|
|
|
|
2019-10-09 10:08:31 +00:00
|
|
|
|
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
2020-03-19 05:26:24 +00:00
|
|
|
|
|
|
|
|
|
public override Judgement CreateJudgement() => new SliderTickJudgement();
|
2017-02-12 19:38:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|