1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 14:12:56 +08:00

Implement proper expiry in test case.

This commit is contained in:
smoogipooo 2017-06-16 13:06:44 +09:00
parent 5bac0919f0
commit c8a1933874

View File

@ -195,11 +195,25 @@ namespace osu.Desktop.VisualTests.Tests
FadeInFromZero(250, EasingTypes.OutQuint);
}
private bool hasExpired = false;
protected override void Update()
{
base.Update();
if (Time.Current >= HitObject.StartTime)
{
background.Colour = Color4.Red;
if (!hasExpired)
{
using (BeginDelayedSequence(200))
{
FadeOut(200);
Expire();
}
hasExpired = true;
}
}
}
}
}