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

Fix drain start time being weirdly incorrect

This commit is contained in:
Dean Herbert 2021-05-07 17:47:33 +09:00
parent 8e78cac058
commit 6c255a0572
2 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@ namespace osu.Game.Tests.Visual.Gameplay
[Test]
public void TestLayerFading()
{
create(new DrainingHealthProcessor(1));
create(new DrainingHealthProcessor(0));
AddSliderStep("current health", 0.0, 1.0, 1.0, val =>
{
@ -62,7 +62,7 @@ namespace osu.Game.Tests.Visual.Gameplay
[Test]
public void TestLayerDisabledViaConfig()
{
create(new DrainingHealthProcessor(1));
create(new DrainingHealthProcessor(0));
AddUntilStep("layer is visible", () => layer.IsPresent);
AddStep("disable layer", () => config.SetValue(OsuSetting.FadePlayfieldWhenHealthLow, false));
AddStep("set health to 0.10", () => layer.Current.Value = 0.1);
@ -81,7 +81,7 @@ namespace osu.Game.Tests.Visual.Gameplay
[Test]
public void TestLayerVisibilityWithDrainingProcessor()
{
create(new DrainingHealthProcessor(1));
create(new DrainingHealthProcessor(0));
AddStep("set health to 0.10", () => layer.Current.Value = 0.1);
AddWaitStep("wait for potential fade", 10);
AddAssert("layer is still visible", () => layer.IsPresent);
@ -90,7 +90,7 @@ namespace osu.Game.Tests.Visual.Gameplay
[Test]
public void TestLayerVisibilityWithDifferentOptions()
{
create(new DrainingHealthProcessor(1));
create(new DrainingHealthProcessor(0));
AddStep("set health to 0.10", () => layer.Current.Value = 0.1);

View File

@ -24,7 +24,7 @@ namespace osu.Game.Tests.Visual.Gameplay
private ScoreProcessor scoreProcessor = new ScoreProcessor();
[Cached(typeof(HealthProcessor))]
private HealthProcessor healthProcessor = new DrainingHealthProcessor(1);
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);
// best way to check without exposing.
private Drawable hideTarget => hudOverlay.KeyCounter;