1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-24 06:43:03 +08:00
osu-lazer/osu.Game.Rulesets.Osu/Objects/SliderTick.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.3 KiB
C#
Raw Normal View History

// 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
2018-01-25 17:52:03 +08:00
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
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
2017-04-18 15:05:58 +08:00
namespace osu.Game.Rulesets.Osu.Objects
2017-02-13 03:38:05 +08:00
{
public class SliderTick : OsuHitObject
{
2018-01-23 12:58:43 +08:00
public int SpanIndex { get; set; }
public double SpanStartTime { get; set; }
2018-04-13 17:19:50 +08:00
protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, IBeatmapDifficultyInfo difficulty)
2018-01-25 17:52:03 +08:00
{
base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
2018-04-13 17:19:50 +08:00
double offset;
2018-04-13 17:19:50 +08: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
offset = TimePreempt * 0.66f;
2018-04-13 17:19:50 +08:00
TimePreempt = (StartTime - SpanStartTime) / 2 + offset;
2018-01-25 17:52:03 +08:00
}
2019-10-09 18:08:31 +08:00
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
public override Judgement CreateJudgement() => new SliderTickJudgement();
2017-02-13 03:38:05 +08:00
}
}