1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:52:57 +08:00

Make initial circles of sliders follow snaking out.

This commit is contained in:
Dean Herbert 2016-12-07 14:52:34 +09:00
parent 27fafe419b
commit 1fff21dc12
3 changed files with 14 additions and 14 deletions

View File

@ -131,12 +131,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
FadeOut(TIME_FADEOUT);
break;
case ArmedState.Miss:
ring.FadeOut();
circle.FadeOut();
number.FadeOut();
glow.FadeOut();
FadeOut(800);
FadeOut(TIME_FADEOUT / 5);
break;
case ArmedState.Hit:
const double flash_in = 30;

View File

@ -73,7 +73,11 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
if (repeat % 2 == 1)
progress = 1 - progress;
bouncer2.Position = slider.Curve.PositionAt(body.SnakedAmount);
bouncer2.Position = slider.Curve.PositionAt(body.SnakedEnd);
//todo: we probably want to reconsider this before adding scoring, but it looks and feels nice.
if (initialCircle.Judgement?.Result != HitResult.Hit)
initialCircle.Position = slider.Curve.PositionAt(body.SnakedStart);
components.ForEach(c => c.UpdateProgress(progress, repeat));
}

View File

@ -90,7 +90,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
snakingOut = config.GetBindable<bool>(OsuConfig.SnakingOutSliders);
}
public double SnakedAmount { get; private set; }
public double SnakedEnd { get; private set; }
public double SnakedStart { get; private set; }
private List<Vector2> currentCurve = new List<Vector2>();
private bool updateSnaking(double p0, double p1)
@ -123,23 +124,23 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
public void UpdateProgress(double progress, int repeat)
{
double start = 0;
double end = SnakedAmount = snakingIn ? MathHelper.Clamp((Time.Current - (slider.StartTime - DrawableOsuHitObject.TIME_PREEMPT)) / DrawableOsuHitObject.TIME_FADEIN, 0, 1) : 1;
SnakedStart = 0;
SnakedEnd = snakingIn ? MathHelper.Clamp((Time.Current - (slider.StartTime - DrawableOsuHitObject.TIME_PREEMPT)) / DrawableOsuHitObject.TIME_FADEIN, 0, 1) : 1;
if (repeat >= slider.RepeatCount - 1)
{
if (Math.Min(repeat, slider.RepeatCount - 1) % 2 == 1)
{
start = 0;
end = snakingOut ? progress : 1;
SnakedStart = 0;
SnakedEnd = snakingOut ? progress : 1;
}
else
{
start = snakingOut ? progress : 0;
SnakedStart = snakingOut ? progress : 0;
}
}
SetRange(start, end);
SetRange(SnakedStart, SnakedEnd);
}
// --------------------------------------------- DO NOT MERGE THIS -----------------------------------------------------------------------