mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 16:32:54 +08:00
Implement proper expiry in test case.
This commit is contained in:
parent
5bac0919f0
commit
c8a1933874
@ -195,11 +195,25 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
FadeInFromZero(250, EasingTypes.OutQuint);
|
FadeInFromZero(250, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool hasExpired = false;
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
if (Time.Current >= HitObject.StartTime)
|
if (Time.Current >= HitObject.StartTime)
|
||||||
|
{
|
||||||
background.Colour = Color4.Red;
|
background.Colour = Color4.Red;
|
||||||
|
|
||||||
|
if (!hasExpired)
|
||||||
|
{
|
||||||
|
using (BeginDelayedSequence(200))
|
||||||
|
{
|
||||||
|
FadeOut(200);
|
||||||
|
Expire();
|
||||||
|
}
|
||||||
|
|
||||||
|
hasExpired = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user