mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 20:12:57 +08:00
Move follow circle tracking to DrawableSliderHead
This commit is contained in:
parent
ee3367d7c5
commit
a5855f5d28
@ -50,10 +50,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
slider.IgnoreJudgement = !DisableSliderHeadJudgement.Value;
|
slider.IgnoreJudgement = !DisableSliderHeadJudgement.Value;
|
||||||
|
|
||||||
foreach (var head in slider.NestedHitObjects.OfType<SliderHeadCircle>())
|
foreach (var head in slider.NestedHitObjects.OfType<SliderHeadCircle>())
|
||||||
{
|
|
||||||
head.TrackFollowCircle = !DisableSliderHeadTracking.Value;
|
|
||||||
head.JudgeAsNormalHitCircle = !DisableSliderHeadJudgement.Value;
|
head.JudgeAsNormalHitCircle = !DisableSliderHeadJudgement.Value;
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -71,8 +68,16 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
{
|
{
|
||||||
foreach (var obj in drawables)
|
foreach (var obj in drawables)
|
||||||
{
|
{
|
||||||
if (obj is DrawableSlider slider)
|
switch (obj)
|
||||||
slider.Ball.TrackVisualSize = !DisableExactFollowCircleTracking.Value;
|
{
|
||||||
|
case DrawableSlider slider:
|
||||||
|
slider.Ball.TrackVisualSize = !DisableExactFollowCircleTracking.Value;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DrawableSliderHead head:
|
||||||
|
head.TrackFollowCircle = !DisableSliderHeadTracking.Value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
public override bool DisplayResult => HitObject?.JudgeAsNormalHitCircle ?? base.DisplayResult;
|
public override bool DisplayResult => HitObject?.JudgeAsNormalHitCircle ?? base.DisplayResult;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Makes this <see cref="DrawableSliderHead"/> track the follow circle when the start time is reached.
|
||||||
|
/// If <c>false</c>, this <see cref="DrawableSliderHead"/> will be pinned to its initial position in the slider.
|
||||||
|
/// </summary>
|
||||||
|
public bool TrackFollowCircle = true;
|
||||||
|
|
||||||
private readonly IBindable<int> pathVersion = new Bindable<int>();
|
private readonly IBindable<int> pathVersion = new Bindable<int>();
|
||||||
|
|
||||||
protected override OsuSkinComponents CirclePieceComponent => OsuSkinComponents.SliderHeadHitCircle;
|
protected override OsuSkinComponents CirclePieceComponent => OsuSkinComponents.SliderHeadHitCircle;
|
||||||
@ -66,7 +72,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
Debug.Assert(Slider != null);
|
Debug.Assert(Slider != null);
|
||||||
Debug.Assert(HitObject != null);
|
Debug.Assert(HitObject != null);
|
||||||
|
|
||||||
if (HitObject.TrackFollowCircle)
|
if (TrackFollowCircle)
|
||||||
{
|
{
|
||||||
double completionProgress = Math.Clamp((Time.Current - Slider.StartTime) / Slider.Duration, 0, 1);
|
double completionProgress = Math.Clamp((Time.Current - Slider.StartTime) / Slider.Duration, 0, 1);
|
||||||
|
|
||||||
|
@ -8,12 +8,6 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
{
|
{
|
||||||
public class SliderHeadCircle : HitCircle
|
public class SliderHeadCircle : HitCircle
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Makes this <see cref="SliderHeadCircle"/> track the follow circle when the start time is reached.
|
|
||||||
/// If <c>false</c>, this <see cref="SliderHeadCircle"/> will be pinned to its initial position in the slider.
|
|
||||||
/// </summary>
|
|
||||||
public bool TrackFollowCircle = true;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to treat this <see cref="SliderHeadCircle"/> as a normal <see cref="HitCircle"/> for judgement purposes.
|
/// Whether to treat this <see cref="SliderHeadCircle"/> as a normal <see cref="HitCircle"/> for judgement purposes.
|
||||||
/// If <c>false</c>, judgement will be ignored.
|
/// If <c>false</c>, judgement will be ignored.
|
||||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
|||||||
if (drawableSlider.HitObject == null)
|
if (drawableSlider.HitObject == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!drawableSlider.HitObject.HeadCircle.TrackFollowCircle)
|
if (!drawableSlider.HeadCircle.TrackFollowCircle)
|
||||||
{
|
{
|
||||||
// When not tracking the follow circle, force the path to not snake out as it looks better that way.
|
// When not tracking the follow circle, force the path to not snake out as it looks better that way.
|
||||||
SnakingOut.UnbindFrom(snakingOut);
|
SnakingOut.UnbindFrom(snakingOut);
|
||||||
|
Loading…
Reference in New Issue
Block a user