From 1f51149da86a35639a7020d43124acf998b32128 Mon Sep 17 00:00:00 2001 From: ColdVolcano Date: Wed, 24 Jan 2018 15:41:51 -0600 Subject: [PATCH] Add xmldoc --- .../Objects/Drawables/DrawableRepeatPoint.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableRepeatPoint.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableRepeatPoint.cs index adf5350996..077e97aa95 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableRepeatPoint.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableRepeatPoint.cs @@ -16,7 +16,11 @@ public class DrawableRepeatPoint : DrawableOsuHitObject, ITrackSnaking { private readonly RepeatPoint repeatPoint; private readonly DrawableSlider drawableSlider; - private bool isEndRepeat => repeatPoint.RepeatIndex % 2 == 0; + + /// + /// Are we located in the last ControlPoint of our + /// + private bool isRepeatAtEnd => repeatPoint.RepeatIndex % 2 == 0; public double FadeInTime; public double FadeOutTime; @@ -76,11 +80,11 @@ protected override void UpdateCurrentState(ArmedState state) public void UpdateSnakingPosition(Vector2 start, Vector2 end) { - Position = isEndRepeat ? end : start; + Position = isRepeatAtEnd ? end : start; var curve = drawableSlider.CurrentCurve; if (curve.Count < 3 || curve.All(p => p == Position)) return; - var referencePoint = curve[isEndRepeat ? curve.IndexOf(Position, curve.Count - 2) - 1 : curve[0] == curve[1] ? 2 : 1]; + var referencePoint = curve[isRepeatAtEnd ? curve.IndexOf(Position, curve.Count - 2) - 1 : curve[0] == curve[1] ? 2 : 1]; Rotation = MathHelper.RadiansToDegrees((float)Math.Atan2(referencePoint.Y - Position.Y, referencePoint.X - Position.X)); } }