mirror of
https://github.com/ppy/osu.git
synced 2025-03-24 19:17:20 +08:00
Get rid of AddDelay & ResetDelay in osu.Game.Rulesets.Osu
This commit is contained in:
parent
87bcd526f3
commit
546efc0181
@ -98,8 +98,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
||||
|
||||
fp.MoveTo(pointEndPosition, DrawableOsuHitObject.TIME_FADEIN, EasingTypes.Out);
|
||||
|
||||
fp.AddDelay(fadeOutTime - fadeInTime);
|
||||
fp.FadeOut(DrawableOsuHitObject.TIME_FADEIN);
|
||||
fp.Delay(fadeOutTime - fadeInTime).FadeOut(DrawableOsuHitObject.TIME_FADEIN);
|
||||
}
|
||||
|
||||
fp.Expire(true);
|
||||
|
@ -26,7 +26,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
protected sealed override void UpdateState(ArmedState state)
|
||||
{
|
||||
Flush();
|
||||
ResetDelay(true);
|
||||
|
||||
using (BeginAbsoluteSequence(HitObject.StartTime - TIME_PREEMPT, true))
|
||||
{
|
||||
|
@ -158,14 +158,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
ball.FadeIn();
|
||||
|
||||
AddDelay(slider.Duration, true);
|
||||
using (BeginDelayedSequence(slider.Duration, true))
|
||||
{
|
||||
body.FadeOut(160);
|
||||
ball.FadeOut(160);
|
||||
|
||||
body.FadeOut(160);
|
||||
ball.FadeOut(160);
|
||||
|
||||
this.FadeOut(800);
|
||||
|
||||
Expire();
|
||||
this.FadeOut(800)
|
||||
.Expire();
|
||||
}
|
||||
}
|
||||
|
||||
public Drawable ProxiedLayer => initialCircle.ApproachCircle;
|
||||
|
@ -75,16 +75,15 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
switch (state)
|
||||
{
|
||||
case ArmedState.Idle:
|
||||
AddDelay(FadeOutTime - sliderTick.StartTime);
|
||||
this.FadeOut();
|
||||
this.Delay(FadeOutTime - sliderTick.StartTime).FadeOut();
|
||||
break;
|
||||
case ArmedState.Miss:
|
||||
this.FadeOut(160);
|
||||
this.FadeColour(Color4.Red, 80);
|
||||
this.FadeOut(160)
|
||||
.FadeColour(Color4.Red, 80);
|
||||
break;
|
||||
case ArmedState.Hit:
|
||||
this.FadeOut(120, EasingTypes.OutQuint);
|
||||
this.ScaleTo(Scale * 1.5f, 120, EasingTypes.OutQuint);
|
||||
this.FadeOut(120, EasingTypes.OutQuint)
|
||||
.ScaleTo(Scale * 1.5f, 120, EasingTypes.OutQuint);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -189,30 +189,28 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
disc.RotateTo(-720);
|
||||
symbol.RotateTo(-720);
|
||||
|
||||
mainContainer.ScaleTo(0);
|
||||
mainContainer.ScaleTo(spinner.Scale * circle.DrawHeight / DrawHeight * 1.4f, TIME_PREEMPT - 150, EasingTypes.OutQuint);
|
||||
|
||||
mainContainer.AddDelay(TIME_PREEMPT - 150);
|
||||
mainContainer.ScaleTo(1, 500, EasingTypes.OutQuint);
|
||||
mainContainer
|
||||
.ScaleTo(0)
|
||||
.ScaleTo(spinner.Scale * circle.DrawHeight / DrawHeight * 1.4f, TIME_PREEMPT - 150, EasingTypes.OutQuint)
|
||||
.Then()
|
||||
.ScaleTo(1, 500, EasingTypes.OutQuint);
|
||||
}
|
||||
|
||||
protected override void UpdateCurrentState(ArmedState state)
|
||||
{
|
||||
AddDelay(spinner.Duration, true);
|
||||
|
||||
this.FadeOut(160);
|
||||
var sequence = this.Delay(spinner.Duration).FadeOut(160);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case ArmedState.Hit:
|
||||
this.ScaleTo(Scale * 1.2f, 320, EasingTypes.Out);
|
||||
Expire();
|
||||
sequence.ScaleTo(Scale * 1.2f, 320, EasingTypes.Out);
|
||||
break;
|
||||
case ArmedState.Miss:
|
||||
this.ScaleTo(Scale * 0.8f, 320, EasingTypes.In);
|
||||
Expire();
|
||||
sequence.ScaleTo(Scale * 0.8f, 320, EasingTypes.In);
|
||||
break;
|
||||
}
|
||||
|
||||
sequence.Expire();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,9 +128,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
if (Complete && updateCompleteTick())
|
||||
{
|
||||
background.Flush(false, nameof(Alpha));
|
||||
background.FadeTo(tracking_alpha + 0.2f, 60, EasingTypes.OutExpo);
|
||||
background.AddDelay(60);
|
||||
background.FadeTo(tracking_alpha, 250, EasingTypes.OutQuint);
|
||||
background
|
||||
.FadeTo(tracking_alpha + 0.2f, 60, EasingTypes.OutExpo)
|
||||
.Then()
|
||||
.FadeTo(tracking_alpha, 250, EasingTypes.OutQuint);
|
||||
}
|
||||
|
||||
this.RotateTo(currentRotation / 2, validAndTracking ? 500 : 1500, EasingTypes.OutExpo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user