mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Replace several usages of BeginDelayedSequence with LINQ-style
This commit is contained in:
@ -204,25 +204,31 @@ namespace osu.Game.Overlays
|
||||
|
||||
using (BeginDelayedSequence(200, true))
|
||||
{
|
||||
disc.FadeIn(initial_duration);
|
||||
disc.FadeIn(initial_duration).ScaleTo(1f, initial_duration * 2, EasingTypes.OutElastic);
|
||||
particleContainer.FadeIn(initial_duration);
|
||||
outerSpin.FadeTo(0.1f, initial_duration * 2);
|
||||
disc.ScaleTo(1f, initial_duration * 2, EasingTypes.OutElastic);
|
||||
|
||||
using (BeginDelayedSequence(initial_duration + 200, true))
|
||||
{
|
||||
backgroundStrip.FadeIn(step_duration);
|
||||
leftStrip.ResizeWidthTo(1f, step_duration, EasingTypes.OutQuint);
|
||||
rightStrip.ResizeWidthTo(1f, step_duration, EasingTypes.OutQuint);
|
||||
Schedule(() => { if (drawableMedal.State != DisplayState.Full) drawableMedal.State = DisplayState.Icon; });
|
||||
|
||||
using (BeginDelayedSequence(step_duration, true))
|
||||
this.Animate().Schedule(() =>
|
||||
{
|
||||
Schedule(() => { if (drawableMedal.State != DisplayState.Full) drawableMedal.State = DisplayState.MedalUnlocked; });
|
||||
|
||||
using (BeginDelayedSequence(step_duration, true))
|
||||
Schedule(() => { if (drawableMedal.State != DisplayState.Full) drawableMedal.State = DisplayState.Full; });
|
||||
}
|
||||
if (drawableMedal.State != DisplayState.Full)
|
||||
drawableMedal.State = DisplayState.Icon;
|
||||
})
|
||||
.Delay(step_duration).Schedule(() =>
|
||||
{
|
||||
if (drawableMedal.State != DisplayState.Full)
|
||||
drawableMedal.State = DisplayState.MedalUnlocked;
|
||||
})
|
||||
.Delay(step_duration).Schedule(() =>
|
||||
{
|
||||
if (drawableMedal.State != DisplayState.Full)
|
||||
drawableMedal.State = DisplayState.Full;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -147,20 +147,17 @@ namespace osu.Game.Overlays.MedalSplash
|
||||
medalContainer.ScaleTo(0);
|
||||
break;
|
||||
case DisplayState.Icon:
|
||||
medalContainer.ScaleTo(1, duration, EasingTypes.OutElastic);
|
||||
medalContainer.FadeIn(duration);
|
||||
medalContainer.FadeIn(duration).ScaleTo(1, duration, EasingTypes.OutElastic);
|
||||
break;
|
||||
case DisplayState.MedalUnlocked:
|
||||
medalContainer.ScaleTo(1);
|
||||
medalContainer.Show();
|
||||
medalContainer.FadeTo(1).ScaleTo(1);
|
||||
|
||||
this.ScaleTo(scale_when_unlocked, duration, EasingTypes.OutExpo);
|
||||
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 30, duration, EasingTypes.OutExpo);
|
||||
unlocked.FadeInFromZero(duration);
|
||||
break;
|
||||
case DisplayState.Full:
|
||||
medalContainer.ScaleTo(1);
|
||||
medalContainer.Show();
|
||||
medalContainer.FadeTo(1).ScaleTo(1);
|
||||
|
||||
this.ScaleTo(scale_when_full, duration, EasingTypes.OutExpo);
|
||||
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 60, duration, EasingTypes.OutExpo);
|
||||
|
@ -81,11 +81,8 @@ namespace osu.Game.Overlays.Mods
|
||||
backgroundIcon.Icon = modAfter.Icon;
|
||||
using (BeginDelayedSequence(mod_switch_duration, true))
|
||||
{
|
||||
foregroundIcon.RotateTo(-rotate_angle * direction);
|
||||
foregroundIcon.RotateTo(0f, mod_switch_duration, mod_switch_easing);
|
||||
|
||||
backgroundIcon.RotateTo(rotate_angle * direction);
|
||||
backgroundIcon.RotateTo(0f, mod_switch_duration, mod_switch_easing);
|
||||
foregroundIcon.RotateTo(-rotate_angle * direction).RotateTo(0f, mod_switch_duration, mod_switch_easing);
|
||||
backgroundIcon.RotateTo(rotate_angle * direction).RotateTo(0f, mod_switch_duration, mod_switch_easing);
|
||||
|
||||
Schedule(() => displayMod(modAfter));
|
||||
}
|
||||
|
@ -154,14 +154,11 @@ namespace osu.Game.Overlays
|
||||
textLine2.Text = settingValue;
|
||||
textLine3.Text = shortcut.ToUpper();
|
||||
|
||||
box.FadeIn(500, EasingTypes.OutQuint);
|
||||
box.ResizeHeightTo(height, 500, EasingTypes.OutQuint);
|
||||
|
||||
using (box.BeginDelayedSequence(500))
|
||||
{
|
||||
box.FadeOutFromOne(1500, EasingTypes.InQuint);
|
||||
box.ResizeHeightTo(height_contracted, 1500, EasingTypes.InQuint);
|
||||
}
|
||||
box.Animate(
|
||||
b => b.FadeIn(500, EasingTypes.OutQuint).ResizeHeightTo(height, 500, EasingTypes.OutQuint)
|
||||
).Then(
|
||||
b => b.FadeOutFromOne(1500, EasingTypes.InQuint).ResizeHeightTo(height_contracted, 1500, EasingTypes.InQuint)
|
||||
);
|
||||
|
||||
int optionCount = 0;
|
||||
int selectedOption = -1;
|
||||
|
Reference in New Issue
Block a user