1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Reformulate push sequence code

This commit is contained in:
Bartłomiej Dach 2020-10-20 00:22:30 +02:00
parent 1ac0b3b13d
commit 6e50ae0458

View File

@ -11,6 +11,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transforms;
using osu.Framework.Input;
using osu.Framework.Screens;
using osu.Framework.Threading;
@ -321,18 +322,24 @@ namespace osu.Game.Screens.Play
{
contentOut();
TransformSequence<PlayerLoader> pushSequence;
if (epilepsyWarning != null)
{
epilepsyWarning.State.Value = Visibility.Visible;
this.Delay(2000).Schedule(() =>
pushSequence = this.Delay(3000).Schedule(() =>
{
epilepsyWarning.Hide();
epilepsyWarning.Expire();
});
}
else
{
pushSequence = this.Delay(0);
}
this.Delay(epilepsyWarning?.State.Value == Visibility.Visible ? 2500 : 250).Schedule(() =>
pushSequence.Delay(250).Schedule(() =>
{
if (!this.IsCurrentScreen()) return;