1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 19:23:21 +08:00

Delay -> ApplyDelay; DelayReset -> ResetDelay

This commit is contained in:
Thomas Müller 2017-07-16 14:06:46 +03:00
parent 6063219b72
commit 71105bb9ee
28 changed files with 45 additions and 45 deletions

@ -1 +1 @@
Subproject commit 1b650814183065be20f10d7df7dce2045cad754e Subproject commit 0bdb38e12e99716e563d27035737ba167d17763d

View File

@ -57,7 +57,7 @@ namespace osu.Desktop.VisualTests.Tests
if (remaining > 0) if (remaining > 0)
{ {
Delay(80); ApplyDelay(80);
Schedule(() => sendBarrage(remaining - 1)); Schedule(() => sendBarrage(remaining - 1));
} }
} }

View File

@ -84,7 +84,7 @@ namespace osu.Desktop.VisualTests.Tests
break; break;
case 5: case 5:
addSwell(1000); addSwell(1000);
playfieldContainer.Delay(scroll_time - 100); playfieldContainer.ApplyDelay(scroll_time - 100);
break; break;
} }

View File

@ -98,7 +98,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
fp.MoveTo(pointEndPosition, DrawableOsuHitObject.TIME_FADEIN, EasingTypes.Out); fp.MoveTo(pointEndPosition, DrawableOsuHitObject.TIME_FADEIN, EasingTypes.Out);
fp.Delay(fadeOutTime - fadeInTime); fp.ApplyDelay(fadeOutTime - fadeInTime);
fp.FadeOut(DrawableOsuHitObject.TIME_FADEIN); fp.FadeOut(DrawableOsuHitObject.TIME_FADEIN);
} }

View File

@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
protected sealed override void UpdateState(ArmedState state) protected sealed override void UpdateState(ArmedState state)
{ {
Flush(); Flush();
DelayReset(); ResetDelay(true);
using (BeginAbsoluteSequence(HitObject.StartTime - TIME_PREEMPT, true)) using (BeginAbsoluteSequence(HitObject.StartTime - TIME_PREEMPT, true))
{ {

View File

@ -158,7 +158,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
{ {
ball.FadeIn(); ball.FadeIn();
Delay(slider.Duration, true); ApplyDelay(slider.Duration, true);
body.FadeOut(160); body.FadeOut(160);
ball.FadeOut(160); ball.FadeOut(160);

View File

@ -66,10 +66,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
this.ScaleTo(1.2f, animIn); this.ScaleTo(1.2f, animIn);
this.FadeIn(animIn); this.FadeIn(animIn);
Delay(animIn); ApplyDelay(animIn);
this.ScaleTo(1, 150, EasingTypes.Out); this.ScaleTo(1, 150, EasingTypes.Out);
Delay(-animIn); ApplyDelay(-animIn);
} }
protected override void UpdateCurrentState(ArmedState state) protected override void UpdateCurrentState(ArmedState state)
@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
switch (state) switch (state)
{ {
case ArmedState.Idle: case ArmedState.Idle:
Delay(FadeOutTime - sliderTick.StartTime); ApplyDelay(FadeOutTime - sliderTick.StartTime);
this.FadeOut(); this.FadeOut();
break; break;
case ArmedState.Miss: case ArmedState.Miss:

View File

@ -192,13 +192,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
mainContainer.ScaleTo(0); mainContainer.ScaleTo(0);
mainContainer.ScaleTo(spinner.Scale * circle.DrawHeight / DrawHeight * 1.4f, TIME_PREEMPT - 150, EasingTypes.OutQuint); mainContainer.ScaleTo(spinner.Scale * circle.DrawHeight / DrawHeight * 1.4f, TIME_PREEMPT - 150, EasingTypes.OutQuint);
mainContainer.Delay(TIME_PREEMPT - 150); mainContainer.ApplyDelay(TIME_PREEMPT - 150);
mainContainer.ScaleTo(1, 500, EasingTypes.OutQuint); mainContainer.ScaleTo(1, 500, EasingTypes.OutQuint);
} }
protected override void UpdateCurrentState(ArmedState state) protected override void UpdateCurrentState(ArmedState state)
{ {
Delay(spinner.Duration, true); ApplyDelay(spinner.Duration, true);
this.FadeOut(160); this.FadeOut(160);

View File

@ -129,7 +129,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
background.Flush(false, nameof(Alpha)); background.Flush(false, nameof(Alpha));
background.FadeTo(tracking_alpha + 0.2f, 60, EasingTypes.OutExpo); background.FadeTo(tracking_alpha + 0.2f, 60, EasingTypes.OutExpo);
background.Delay(60); background.ApplyDelay(60);
background.FadeTo(tracking_alpha, 250, EasingTypes.OutQuint); background.FadeTo(tracking_alpha, 250, EasingTypes.OutQuint);
} }

View File

@ -64,7 +64,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
protected override void LoadComplete() protected override void LoadComplete()
{ {
base.LoadComplete(); base.LoadComplete();
Delay(BarLine.StartTime - Time.Current); ApplyDelay(BarLine.StartTime - Time.Current);
this.FadeOut(base_fadeout_time * BarLine.ScrollTime / 1000); this.FadeOut(base_fadeout_time * BarLine.ScrollTime / 1000);
} }

View File

@ -65,7 +65,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
protected override void UpdateState(ArmedState state) protected override void UpdateState(ArmedState state)
{ {
Delay(HitObject.StartTime - Time.Current + Judgement.TimeOffset, true); ApplyDelay(HitObject.StartTime - Time.Current + Judgement.TimeOffset, true);
var circlePiece = MainPiece as CirclePiece; var circlePiece = MainPiece as CirclePiece;
@ -74,7 +74,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
switch (State) switch (State)
{ {
case ArmedState.Idle: case ArmedState.Idle:
Delay(HitObject.HitWindowMiss); ApplyDelay(HitObject.HitWindowMiss);
break; break;
case ArmedState.Miss: case ArmedState.Miss:
this.FadeOut(100); this.FadeOut(100);
@ -98,7 +98,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
Content.ScaleTo(0.8f, gravity_time * 2, EasingTypes.OutQuad); Content.ScaleTo(0.8f, gravity_time * 2, EasingTypes.OutQuad);
this.MoveToY(-gravity_travel_height, gravity_time, EasingTypes.Out); this.MoveToY(-gravity_travel_height, gravity_time, EasingTypes.Out);
Delay(gravity_time, true); ApplyDelay(gravity_time, true);
this.MoveToY(gravity_travel_height * 2, gravity_time * 2, EasingTypes.In); this.MoveToY(gravity_travel_height * 2, gravity_time * 2, EasingTypes.In);
break; break;
} }

View File

@ -181,13 +181,13 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{ {
const float preempt = 100; const float preempt = 100;
Delay(HitObject.StartTime - Time.Current - preempt, true); ApplyDelay(HitObject.StartTime - Time.Current - preempt, true);
targetRing.ScaleTo(target_ring_scale, preempt * 4, EasingTypes.OutQuint); targetRing.ScaleTo(target_ring_scale, preempt * 4, EasingTypes.OutQuint);
Delay(preempt, true); ApplyDelay(preempt, true);
Delay(Judgement.TimeOffset + HitObject.Duration, true); ApplyDelay(Judgement.TimeOffset + HitObject.Duration, true);
const float out_transition_time = 300; const float out_transition_time = 300;

View File

@ -150,12 +150,12 @@ namespace osu.Game.Rulesets.Taiko.UI
const float up_time = 1000; const float up_time = 1000;
back.ScaleTo(target.Scale.X - scale_amount, down_time, EasingTypes.OutQuint); back.ScaleTo(target.Scale.X - scale_amount, down_time, EasingTypes.OutQuint);
back.Delay(down_time); back.ApplyDelay(down_time);
back.ScaleTo(1, up_time, EasingTypes.OutQuint); back.ScaleTo(1, up_time, EasingTypes.OutQuint);
target.ScaleTo(target.Scale.X - scale_amount, down_time, EasingTypes.OutQuint); target.ScaleTo(target.Scale.X - scale_amount, down_time, EasingTypes.OutQuint);
target.FadeTo(Math.Min(target.Alpha + alpha_amount, 1), down_time, EasingTypes.OutQuint); target.FadeTo(Math.Min(target.Alpha + alpha_amount, 1), down_time, EasingTypes.OutQuint);
target.Delay(down_time); target.ApplyDelay(down_time);
target.ScaleTo(1, up_time, EasingTypes.OutQuint); target.ScaleTo(1, up_time, EasingTypes.OutQuint);
target.FadeOut(up_time, EasingTypes.OutQuint); target.FadeOut(up_time, EasingTypes.OutQuint);
} }

View File

@ -99,7 +99,7 @@ namespace osu.Game.Graphics.UserInterface
colourContainer.ResizeTo(new Vector2(1.5f, 1f), click_duration, EasingTypes.In); colourContainer.ResizeTo(new Vector2(1.5f, 1f), click_duration, EasingTypes.In);
flash(); flash();
Delay(click_duration); ApplyDelay(click_duration);
Schedule(delegate { Schedule(delegate {
colourContainer.ResizeTo(new Vector2(0.8f, 1f)); colourContainer.ResizeTo(new Vector2(0.8f, 1f));
spriteText.Spacing = Vector2.Zero; spriteText.Spacing = Vector2.Zero;

View File

@ -106,7 +106,7 @@ namespace osu.Game.Graphics.UserInterface.Volume
private void schedulePopOut() private void schedulePopOut()
{ {
popOutDelegate?.Cancel(); popOutDelegate?.Cancel();
Delay(1000); ApplyDelay(1000);
popOutDelegate = Schedule(Hide); popOutDelegate = Schedule(Hide);
} }
} }

View File

@ -119,7 +119,7 @@ namespace osu.Game
if (!menu.IsCurrentScreen) if (!menu.IsCurrentScreen)
{ {
menu.MakeCurrent(); menu.MakeCurrent();
Delay(500); ApplyDelay(500);
scoreLoad = Schedule(() => LoadScore(s)); scoreLoad = Schedule(() => LoadScore(s));
return; return;
} }

View File

@ -35,7 +35,7 @@ namespace osu.Game.Overlays
if (v != Visibility.Hidden) return; if (v != Visibility.Hidden) return;
//handle the dialog being dismissed. //handle the dialog being dismissed.
dialog.Delay(PopupDialog.EXIT_DURATION); dialog.ApplyDelay(PopupDialog.EXIT_DURATION);
dialog.Expire(); dialog.Expire();
if (dialog == currentDialog) if (dialog == currentDialog)

View File

@ -80,7 +80,7 @@ namespace osu.Game.Overlays.Notifications
NotificationContent.MoveToY(-DrawSize.Y / 2, 200, EasingTypes.OutQuint); NotificationContent.MoveToY(-DrawSize.Y / 2, 200, EasingTypes.OutQuint);
this.FadeTo(0.01f, 200); //don't completely fade out or our scheduled task won't run. this.FadeTo(0.01f, 200); //don't completely fade out or our scheduled task won't run.
Delay(100); ApplyDelay(100);
Schedule(Completed); Schedule(Completed);
break; break;
} }

View File

@ -75,14 +75,14 @@ namespace osu.Game.Rulesets.Judgements
this.MoveToOffset(new Vector2(0, 100), 800, EasingTypes.InQuint); this.MoveToOffset(new Vector2(0, 100), 800, EasingTypes.InQuint);
this.RotateTo(40, 800, EasingTypes.InQuint); this.RotateTo(40, 800, EasingTypes.InQuint);
Delay(600); ApplyDelay(600);
this.FadeOut(200); this.FadeOut(200);
break; break;
case HitResult.Hit: case HitResult.Hit:
this.ScaleTo(0.9f); this.ScaleTo(0.9f);
this.ScaleTo(1, 500, EasingTypes.OutElastic); this.ScaleTo(1, 500, EasingTypes.OutElastic);
Delay(100); ApplyDelay(100);
this.FadeOut(400); this.FadeOut(400);
break; break;
} }

View File

@ -100,14 +100,14 @@ namespace osu.Game.Screens.Menu
Content.FadeInFromZero(500); Content.FadeInFromZero(500);
icon.Delay(1500); icon.ApplyDelay(1500);
icon.FadeColour(iconColour, 200); icon.FadeColour(iconColour, 200);
Delay(6000, true); ApplyDelay(6000, true);
Content.FadeOut(250); Content.FadeOut(250);
Delay(250); ApplyDelay(250);
Schedule(() => Push(intro)); Schedule(() => Push(intro));
} }

View File

@ -98,7 +98,7 @@ namespace osu.Game.Screens.Play.HUD
return; return;
fill.FadeEdgeEffectTo(Math.Min(1, fill.EdgeEffect.Colour.Linear.A + (1f - base_glow_opacity) / glow_max_hits), 50, EasingTypes.OutQuint); fill.FadeEdgeEffectTo(Math.Min(1, fill.EdgeEffect.Colour.Linear.A + (1f - base_glow_opacity) / glow_max_hits), 50, EasingTypes.OutQuint);
fill.Delay(glow_fade_delay); fill.ApplyDelay(glow_fade_delay);
fill.FadeEdgeEffectTo(base_glow_opacity, glow_fade_time, EasingTypes.OutQuint); fill.FadeEdgeEffectTo(base_glow_opacity, glow_fade_time, EasingTypes.OutQuint);
} }

View File

@ -58,7 +58,7 @@ namespace osu.Game.Screens.Play
{ {
OnResume = delegate OnResume = delegate
{ {
Delay(400); ApplyDelay(400);
Schedule(Resume); Schedule(Resume);
}, },
OnRetry = () => OnRetry(), OnRetry = () => OnRetry(),

View File

@ -77,7 +77,7 @@ namespace osu.Game.Screens.Play
Beatmap = player.Beatmap, Beatmap = player.Beatmap,
}); });
Delay(400); ApplyDelay(400);
Schedule(pushWhenLoaded); Schedule(pushWhenLoaded);
} }
@ -104,14 +104,14 @@ namespace osu.Game.Screens.Play
contentIn(); contentIn();
Delay(500, true); ApplyDelay(500, true);
logo.MoveToOffset(new Vector2(0, -180), 500, EasingTypes.InOutExpo); logo.MoveToOffset(new Vector2(0, -180), 500, EasingTypes.InOutExpo);
Delay(250, true); ApplyDelay(250, true);
info.FadeIn(500); info.FadeIn(500);
Delay(1400, true); ApplyDelay(1400, true);
Schedule(pushWhenLoaded); Schedule(pushWhenLoaded);
} }
@ -123,7 +123,7 @@ namespace osu.Game.Screens.Play
contentOut(); contentOut();
Delay(250); ApplyDelay(250);
Schedule(() => Schedule(() =>
{ {

View File

@ -33,7 +33,7 @@ namespace osu.Game.Screens.Ranking
protected override void LoadComplete() protected override void LoadComplete()
{ {
base.LoadComplete(); base.LoadComplete();
fill.Delay(400); fill.ApplyDelay(400);
fill.FadeInFromZero(600); fill.FadeInFromZero(600);
} }

View File

@ -179,7 +179,7 @@ namespace osu.Game.Screens.Ranking
foreach (var s in statisticsContainer.Children) foreach (var s in statisticsContainer.Children)
{ {
s.FadeOut(); s.FadeOut();
s.Delay(delay += 200); s.ApplyDelay(delay += 200);
s.FadeIn(300 + delay, EasingTypes.Out); s.FadeIn(300 + delay, EasingTypes.Out);
} }
}); });

View File

@ -44,7 +44,7 @@ namespace osu.Game.Screens
boxContainer.ScaleTo(0.2f); boxContainer.ScaleTo(0.2f);
boxContainer.RotateTo(-20); boxContainer.RotateTo(-20);
Content.Delay(300, true); Content.ApplyDelay(300, true);
boxContainer.ScaleTo(1, transition_time, EasingTypes.OutElastic); boxContainer.ScaleTo(1, transition_time, EasingTypes.OutElastic);
boxContainer.RotateTo(0, transition_time / 2, EasingTypes.OutQuint); boxContainer.RotateTo(0, transition_time / 2, EasingTypes.OutQuint);

View File

@ -63,7 +63,7 @@ namespace osu.Game.Screens.Select.Leaderboards
}; };
scrollFlow.Add(ls); scrollFlow.Add(ls);
ls.Delay(i++ * 50, true); ls.ApplyDelay(i++ * 50, true);
ls.Show(); ls.Show();
} }

View File

@ -64,18 +64,18 @@ namespace osu.Game.Screens.Select.Leaderboards
this.FadeIn(200); this.FadeIn(200);
content.MoveToY(0, 800, EasingTypes.OutQuint); content.MoveToY(0, 800, EasingTypes.OutQuint);
Delay(100, true); ApplyDelay(100, true);
avatar.FadeIn(300, EasingTypes.OutQuint); avatar.FadeIn(300, EasingTypes.OutQuint);
nameLabel.FadeIn(350, EasingTypes.OutQuint); nameLabel.FadeIn(350, EasingTypes.OutQuint);
avatar.MoveToX(0, 300, EasingTypes.OutQuint); avatar.MoveToX(0, 300, EasingTypes.OutQuint);
nameLabel.MoveToX(0, 350, EasingTypes.OutQuint); nameLabel.MoveToX(0, 350, EasingTypes.OutQuint);
Delay(250, true); ApplyDelay(250, true);
scoreLabel.FadeIn(200); scoreLabel.FadeIn(200);
scoreRank.FadeIn(200); scoreRank.FadeIn(200);
Delay(50, true); ApplyDelay(50, true);
var drawables = new Drawable[] { flagBadgeContainer, maxCombo, accuracy, modsContainer, }; var drawables = new Drawable[] { flagBadgeContainer, maxCombo, accuracy, modsContainer, };
for (int i = 0; i < drawables.Length; i++) for (int i = 0; i < drawables.Length; i++)