1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Move property back to local variable

Never used elsewhere
This commit is contained in:
Dean Herbert 2018-02-06 18:14:08 +09:00
parent 55e3d096f5
commit 3d0ef8b3bd

View File

@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Objects.Drawables;
using OpenTK;
@ -16,11 +17,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
private readonly RepeatPoint repeatPoint;
private readonly DrawableSlider drawableSlider;
/// <summary>
/// Whether this repeat point is at the end of the slider's curve.
/// </summary>
private bool isRepeatAtEnd => repeatPoint.RepeatIndex % 2 == 0;
private double animDuration;
public DrawableRepeatPoint(RepeatPoint repeatPoint, DrawableSlider drawableSlider)
@ -79,9 +75,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
public void UpdateSnakingPosition(Vector2 start, Vector2 end)
{
Position = isRepeatAtEnd ? end : start;
bool isRepeatAtEnd = repeatPoint.RepeatIndex % 2 == 0;
List<Vector2> curve = drawableSlider.Body.CurrentCurve;
var curve = drawableSlider.Body.CurrentCurve;
Position = isRepeatAtEnd ? end : start;
if (curve.Count < 2)
return;