2019-01-24 16:43:03 +08: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 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Beatmaps.ControlPoints;
|
2018-08-02 19:36:38 +08:00
|
|
|
|
using osu.Game.Rulesets.Judgements;
|
|
|
|
|
using osu.Game.Rulesets.Osu.Judgements;
|
2019-09-06 14:24:00 +08:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.Objects
|
|
|
|
|
{
|
|
|
|
|
public class SliderTick : OsuHitObject
|
|
|
|
|
{
|
|
|
|
|
public int SpanIndex { get; set; }
|
|
|
|
|
public double SpanStartTime { get; set; }
|
|
|
|
|
|
|
|
|
|
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
|
2018-07-05 10:32:09 +08:00
|
|
|
|
offset = TimeFadeIn * 0.66f;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
TimePreempt = (StartTime - SpanStartTime) / 2 + offset;
|
|
|
|
|
}
|
2018-08-02 19:36:38 +08:00
|
|
|
|
|
2019-10-09 18:08:31 +08:00
|
|
|
|
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
|
2020-03-19 13:26:24 +08:00
|
|
|
|
|
|
|
|
|
public override Judgement CreateJudgement() => new SliderTickJudgement();
|
|
|
|
|
|
|
|
|
|
public class SliderTickJudgement : OsuJudgement
|
|
|
|
|
{
|
2020-09-29 13:35:43 +08:00
|
|
|
|
public override HitResult MaxResult => HitResult.LargeTickHit;
|
2020-03-19 13:26:24 +08:00
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|