diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderBouncer.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableRepeatPoint.cs similarity index 78% rename from osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderBouncer.cs rename to osu.Game.Rulesets.Osu/Objects/Drawables/DrawableRepeatPoint.cs index 45be022027..bb200c9ecd 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderBouncer.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableRepeatPoint.cs @@ -10,9 +10,9 @@ using osu.Game.Rulesets.Osu.Judgements; namespace osu.Game.Rulesets.Osu.Objects.Drawables { - public class DrawableSliderBouncer : DrawableOsuHitObject + public class DrawableRepeatPoint : DrawableOsuHitObject { - private readonly SliderBouncer sliderBouncer; + private readonly RepeatPoint repeatPoint; private readonly DrawableSlider drawableSlider; public double FadeInTime; @@ -20,9 +20,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables public override bool RemoveWhenNotAlive => false; - public DrawableSliderBouncer(SliderBouncer sliderBouncer, DrawableSlider drawableSlider) : base(sliderBouncer) + public DrawableRepeatPoint(RepeatPoint repeatPoint, DrawableSlider drawableSlider) : base(repeatPoint) { - this.sliderBouncer = sliderBouncer; + this.repeatPoint = repeatPoint; this.drawableSlider = drawableSlider; AutoSizeAxes = Axes.Both; @@ -43,13 +43,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables protected override void CheckForJudgements(bool userTriggered, double timeOffset) { - if (sliderBouncer.StartTime <= Time.Current) + if (repeatPoint.StartTime <= Time.Current) AddJudgement(new OsuJudgement { Result = drawableSlider.Tracking ? HitResult.Great : HitResult.Miss }); } protected override void UpdatePreemptState() { - var animIn = Math.Min(150, sliderBouncer.StartTime - FadeInTime); + var animIn = Math.Min(150, repeatPoint.StartTime - FadeInTime); this.Animate( d => d.FadeIn(animIn), @@ -64,7 +64,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables switch (state) { case ArmedState.Idle: - this.Delay(FadeOutTime - sliderBouncer.StartTime).FadeOut(); + this.Delay(FadeOutTime - repeatPoint.StartTime).FadeOut(); break; case ArmedState.Miss: this.FadeOut(160); diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs index 2833cc81bf..2e6e82ce0c 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs @@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables private readonly List components = new List(); private readonly Container ticks; - private readonly Container bouncers; + private readonly Container repeatPoints; private readonly SliderBody body; private readonly SliderBall ball; @@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables PathWidth = s.Scale * 64, }, ticks = new Container(), - bouncers = new Container(), + repeatPoints = new Container(), ball = new SliderBall(s) { Scale = new Vector2(s.Scale), @@ -80,21 +80,21 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables AddNested(drawableTick); } - foreach (var bouncer in s.Bouncers) + foreach (var repeatPoint in s.RepeatPoints) { - var repeatStartTime = s.StartTime + bouncer.RepeatIndex * repeatDuration; - var fadeInTime = repeatStartTime + (bouncer.StartTime - repeatStartTime) / 2 - (bouncer.RepeatIndex == 0 ? TIME_FADEIN : TIME_FADEIN / 2); + var repeatStartTime = s.StartTime + repeatPoint.RepeatIndex * repeatDuration; + var fadeInTime = repeatStartTime + (repeatPoint.StartTime - repeatStartTime) / 2 - (repeatPoint.RepeatIndex == 0 ? TIME_FADEIN : TIME_FADEIN / 2); var fadeOutTime = repeatStartTime + repeatDuration; - var drawableBouncer = new DrawableSliderBouncer(bouncer, this) + var drawableRepeatPoint = new DrawableRepeatPoint(repeatPoint, this) { FadeInTime = fadeInTime, FadeOutTime = fadeOutTime, - Position = bouncer.Position, + Position = repeatPoint.Position, }; - bouncers.Add(drawableBouncer); - AddNested(drawableBouncer); + repeatPoints.Add(drawableRepeatPoint); + AddNested(drawableRepeatPoint); } } @@ -131,8 +131,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables { if (!userTriggered && Time.Current >= slider.EndTime) { - var judgementsCount = ticks.Children.Count + bouncers.Children.Count + 1; - var judgementsHit = ticks.Children.Count(t => t.Judgements.Any(j => j.IsHit)) + bouncers.Children.Count(t => t.Judgements.Any(j => j.IsHit)); + var judgementsCount = ticks.Children.Count + repeatPoints.Children.Count + 1; + var judgementsHit = ticks.Children.Count(t => t.Judgements.Any(j => j.IsHit)) + repeatPoints.Children.Count(t => t.Judgements.Any(j => j.IsHit)); if (initialCircle.Judgements.Any(j => j.IsHit)) judgementsHit++; diff --git a/osu.Game.Rulesets.Osu/Objects/SliderBouncer.cs b/osu.Game.Rulesets.Osu/Objects/RepeatPoint.cs similarity index 81% rename from osu.Game.Rulesets.Osu/Objects/SliderBouncer.cs rename to osu.Game.Rulesets.Osu/Objects/RepeatPoint.cs index da98cc8422..c113b7cd7a 100644 --- a/osu.Game.Rulesets.Osu/Objects/SliderBouncer.cs +++ b/osu.Game.Rulesets.Osu/Objects/RepeatPoint.cs @@ -3,7 +3,7 @@ namespace osu.Game.Rulesets.Osu.Objects { - public class SliderBouncer : OsuHitObject + public class RepeatPoint : OsuHitObject { public int RepeatIndex { get; set; } } diff --git a/osu.Game.Rulesets.Osu/Objects/Slider.cs b/osu.Game.Rulesets.Osu/Objects/Slider.cs index b501e8e86a..7522a449c6 100644 --- a/osu.Game.Rulesets.Osu/Objects/Slider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Slider.cs @@ -61,7 +61,6 @@ namespace osu.Game.Rulesets.Osu.Objects public double Velocity; public double TickDistance; - public double BouncerDistance; public override void ApplyDefaults(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty) { @@ -74,7 +73,6 @@ namespace osu.Game.Rulesets.Osu.Objects Velocity = scoringDistance / timingPoint.BeatLength; TickDistance = scoringDistance / difficulty.SliderTickRate; - BouncerDistance = Distance; } public Vector2 PositionAt(double progress) => Curve.PositionAt(ProgressAt(progress)); @@ -133,23 +131,23 @@ namespace osu.Game.Rulesets.Osu.Objects } } } - public IEnumerable Bouncers + public IEnumerable RepeatPoints { get { var length = Curve.Distance; - var bouncerDistance = Math.Min(BouncerDistance, length); + var repeatPointDistance = Math.Min(Distance, length); var repeatDuration = length / Velocity; for (var repeat = 0; repeat < RepeatCount; repeat++) { if (repeat > 0) - for (var d = bouncerDistance; d <= length; d += bouncerDistance) + for (var d = repeatPointDistance; d <= length; d += repeatPointDistance) { var repeatStartTime = StartTime + repeat * repeatDuration; var distanceProgress = d / length; - yield return new SliderBouncer + yield return new RepeatPoint { RepeatIndex = repeat, StartTime = repeatStartTime, diff --git a/osu.Game.Rulesets.Osu/Scoring/OsuScoreProcessor.cs b/osu.Game.Rulesets.Osu/Scoring/OsuScoreProcessor.cs index 990ff4bdef..9252b3b7b8 100644 --- a/osu.Game.Rulesets.Osu/Scoring/OsuScoreProcessor.cs +++ b/osu.Game.Rulesets.Osu/Scoring/OsuScoreProcessor.cs @@ -42,8 +42,8 @@ namespace osu.Game.Rulesets.Osu.Scoring foreach (var unused in slider.Ticks) AddJudgement(new OsuJudgement { Result = HitResult.Great }); - //Bouncers - foreach (var unused in slider.Bouncers) + //Repeats + foreach (var unused in slider.RepeatPoints) AddJudgement(new OsuJudgement { Result = HitResult.Great }); } diff --git a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj index 662fba49d4..d950742589 100644 --- a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj +++ b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj @@ -53,7 +53,7 @@ - + @@ -72,7 +72,7 @@ - +