mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Add flag to toggle follow circle tracking for slider heads
This commit is contained in:
@ -12,6 +12,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
public class DrawableSliderHead : DrawableHitCircle
|
public class DrawableSliderHead : DrawableHitCircle
|
||||||
{
|
{
|
||||||
|
public new SliderHeadCircle HitObject => (SliderHeadCircle)base.HitObject;
|
||||||
|
|
||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
public Slider Slider => DrawableSlider?.HitObject;
|
public Slider Slider => DrawableSlider?.HitObject;
|
||||||
|
|
||||||
@ -59,12 +61,16 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
Debug.Assert(Slider != null);
|
Debug.Assert(Slider != null);
|
||||||
|
Debug.Assert(HitObject != null);
|
||||||
|
|
||||||
double completionProgress = Math.Clamp((Time.Current - Slider.StartTime) / Slider.Duration, 0, 1);
|
if (HitObject.TrackFollowCircle)
|
||||||
|
{
|
||||||
|
double completionProgress = Math.Clamp((Time.Current - Slider.StartTime) / Slider.Duration, 0, 1);
|
||||||
|
|
||||||
//todo: we probably want to reconsider this before adding scoring, but it looks and feels nice.
|
//todo: we probably want to reconsider this before adding scoring, but it looks and feels nice.
|
||||||
if (!IsHit)
|
if (!IsHit)
|
||||||
Position = Slider.CurvePositionAt(completionProgress);
|
Position = Slider.CurvePositionAt(completionProgress);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action<double> OnShake;
|
public Action<double> OnShake;
|
||||||
|
@ -5,5 +5,9 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
{
|
{
|
||||||
public class SliderHeadCircle : HitCircle
|
public class SliderHeadCircle : HitCircle
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Makes the head circle track the follow circle when the start time is reached.
|
||||||
|
/// </summary>
|
||||||
|
public bool TrackFollowCircle = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user