mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Refactor sliders to have more central position/progress calculations.
This commit is contained in:
@ -102,8 +102,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
|
||||
double progress = MathHelper.Clamp((Time.Current - slider.StartTime) / slider.Duration, 0, 1);
|
||||
|
||||
int repeat = (int)(progress * slider.RepeatCount);
|
||||
progress = (progress * slider.RepeatCount) % 1;
|
||||
int repeat = slider.RepeatAt(progress);
|
||||
progress = slider.CurveProgressAt(progress);
|
||||
|
||||
if (repeat > currentRepeat)
|
||||
{
|
||||
@ -112,9 +112,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
currentRepeat = repeat;
|
||||
}
|
||||
|
||||
if (repeat % 2 == 1)
|
||||
progress = 1 - progress;
|
||||
|
||||
bouncer2.Position = slider.Curve.PositionAt(body.SnakedEnd ?? 0);
|
||||
|
||||
//todo: we probably want to reconsider this before adding scoring, but it looks and feels nice.
|
||||
|
Reference in New Issue
Block a user