mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:35:35 +08:00
adjust spinner sequence to the new fadeout speed
This commit is contained in:
parent
7d29c076d2
commit
e42fa7205b
@ -70,10 +70,10 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
using (slider.BeginAbsoluteSequence(fadeOutTime, true))
|
||||
{
|
||||
var duration = slider.Slider.EndTime - fadeOutTime; // new duration from fade in to end of the slider
|
||||
slider.Body.FadeOut(duration);
|
||||
var sliderDuration = slider.Slider.EndTime - fadeOutTime; // new duration from fade in to end of the slider
|
||||
slider.Body.FadeOut(sliderDuration);
|
||||
// delay a bit less to let the sliderball fade out peacefully instead of having a hard cut
|
||||
using (slider.BeginDelayedSequence(duration - fadeOut, true))
|
||||
using (slider.BeginDelayedSequence(sliderDuration - fadeOut, true))
|
||||
{
|
||||
slider.Ball.FadeOut(fadeOut);
|
||||
slider.Delay(fadeOut).Expire();
|
||||
@ -84,6 +84,23 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
spinner.Disc.FadeOut();
|
||||
spinner.Ticks.FadeOut();
|
||||
spinner.Background.FadeOut();
|
||||
|
||||
using (spinner.BeginAbsoluteSequence(fadeOutTime, true))
|
||||
{
|
||||
var spinnerDuration = spinner.Spinner.EndTime - fadeOutTime; // new duration from fade in to end of the spinner
|
||||
var sequence = spinner.Delay(spinnerDuration).FadeOut(fadeOut);
|
||||
// speed up the end sequence accordingly
|
||||
switch (state)
|
||||
{
|
||||
case ArmedState.Hit:
|
||||
sequence.ScaleTo(spinner.Scale * 1.2f, fadeOut * 2, Easing.Out);
|
||||
break;
|
||||
case ArmedState.Miss:
|
||||
sequence.ScaleTo(spinner.Scale * 0.8f, fadeOut * 2, Easing.Out);
|
||||
break;
|
||||
}
|
||||
sequence.Expire();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
public class DrawableSpinner : DrawableOsuHitObject
|
||||
{
|
||||
private readonly Spinner spinner;
|
||||
public readonly Spinner Spinner;
|
||||
|
||||
public readonly SpinnerDisc Disc;
|
||||
public readonly SpinnerTicks Ticks;
|
||||
@ -49,7 +49,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
// we are slightly bigger than our parent, to clip the top and bottom of the circle
|
||||
Height = 1.3f;
|
||||
|
||||
spinner = s;
|
||||
Spinner = s;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -90,7 +90,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
Disc = new SpinnerDisc(spinner)
|
||||
Disc = new SpinnerDisc(Spinner)
|
||||
{
|
||||
Scale = Vector2.Zero,
|
||||
Anchor = Anchor.Centre,
|
||||
@ -114,7 +114,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
};
|
||||
}
|
||||
|
||||
public float Progress => MathHelper.Clamp(Disc.RotationAbsolute / 360 / spinner.SpinsRequired, 0, 1);
|
||||
public float Progress => MathHelper.Clamp(Disc.RotationAbsolute / 360 / Spinner.SpinsRequired, 0, 1);
|
||||
|
||||
protected override void CheckForJudgements(bool userTriggered, double timeOffset)
|
||||
{
|
||||
@ -135,7 +135,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
glow.FadeColour(completeColour, duration);
|
||||
}
|
||||
|
||||
if (!userTriggered && Time.Current >= spinner.EndTime)
|
||||
if (!userTriggered && Time.Current >= Spinner.EndTime)
|
||||
{
|
||||
if (Progress >= 1)
|
||||
AddJudgement(new OsuJudgement { Result = HitResult.Great });
|
||||
@ -143,7 +143,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
AddJudgement(new OsuJudgement { Result = HitResult.Good });
|
||||
else if (Progress > .75)
|
||||
AddJudgement(new OsuJudgement { Result = HitResult.Meh });
|
||||
else if (Time.Current >= spinner.EndTime)
|
||||
else if (Time.Current >= Spinner.EndTime)
|
||||
AddJudgement(new OsuJudgement { Result = HitResult.Miss });
|
||||
}
|
||||
}
|
||||
@ -179,7 +179,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
Ticks.Rotation = Disc.Rotation;
|
||||
spmCounter.SetRotation(Disc.RotationAbsolute);
|
||||
|
||||
float relativeCircleScale = spinner.Scale * circle.DrawHeight / mainContainer.DrawHeight;
|
||||
float relativeCircleScale = Spinner.Scale * circle.DrawHeight / mainContainer.DrawHeight;
|
||||
Disc.ScaleTo(relativeCircleScale + (1 - relativeCircleScale) * Progress, 200, Easing.OutQuint);
|
||||
|
||||
symbol.RotateTo(Disc.Rotation / 2, 500, Easing.OutQuint);
|
||||
@ -189,22 +189,22 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
base.UpdatePreemptState();
|
||||
|
||||
circleContainer.ScaleTo(spinner.Scale * 0.3f);
|
||||
circleContainer.ScaleTo(spinner.Scale, TIME_PREEMPT / 1.4f, Easing.OutQuint);
|
||||
circleContainer.ScaleTo(Spinner.Scale * 0.3f);
|
||||
circleContainer.ScaleTo(Spinner.Scale, TIME_PREEMPT / 1.4f, Easing.OutQuint);
|
||||
|
||||
Disc.RotateTo(-720);
|
||||
symbol.RotateTo(-720);
|
||||
|
||||
mainContainer
|
||||
.ScaleTo(0)
|
||||
.ScaleTo(spinner.Scale * circle.DrawHeight / DrawHeight * 1.4f, TIME_PREEMPT - 150, Easing.OutQuint)
|
||||
.ScaleTo(Spinner.Scale * circle.DrawHeight / DrawHeight * 1.4f, TIME_PREEMPT - 150, Easing.OutQuint)
|
||||
.Then()
|
||||
.ScaleTo(1, 500, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override void UpdateCurrentState(ArmedState state)
|
||||
{
|
||||
var sequence = this.Delay(spinner.Duration).FadeOut(160);
|
||||
var sequence = this.Delay(Spinner.Duration).FadeOut(160);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user