mirror of
https://github.com/ppy/osu.git
synced 2025-02-06 03:02:59 +08:00
Fix drain start time being weirdly incorrect
This commit is contained in:
parent
8e78cac058
commit
6c255a0572
@ -45,7 +45,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestLayerFading()
|
public void TestLayerFading()
|
||||||
{
|
{
|
||||||
create(new DrainingHealthProcessor(1));
|
create(new DrainingHealthProcessor(0));
|
||||||
|
|
||||||
AddSliderStep("current health", 0.0, 1.0, 1.0, val =>
|
AddSliderStep("current health", 0.0, 1.0, 1.0, val =>
|
||||||
{
|
{
|
||||||
@ -62,7 +62,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestLayerDisabledViaConfig()
|
public void TestLayerDisabledViaConfig()
|
||||||
{
|
{
|
||||||
create(new DrainingHealthProcessor(1));
|
create(new DrainingHealthProcessor(0));
|
||||||
AddUntilStep("layer is visible", () => layer.IsPresent);
|
AddUntilStep("layer is visible", () => layer.IsPresent);
|
||||||
AddStep("disable layer", () => config.SetValue(OsuSetting.FadePlayfieldWhenHealthLow, false));
|
AddStep("disable layer", () => config.SetValue(OsuSetting.FadePlayfieldWhenHealthLow, false));
|
||||||
AddStep("set health to 0.10", () => layer.Current.Value = 0.1);
|
AddStep("set health to 0.10", () => layer.Current.Value = 0.1);
|
||||||
@ -81,7 +81,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestLayerVisibilityWithDrainingProcessor()
|
public void TestLayerVisibilityWithDrainingProcessor()
|
||||||
{
|
{
|
||||||
create(new DrainingHealthProcessor(1));
|
create(new DrainingHealthProcessor(0));
|
||||||
AddStep("set health to 0.10", () => layer.Current.Value = 0.1);
|
AddStep("set health to 0.10", () => layer.Current.Value = 0.1);
|
||||||
AddWaitStep("wait for potential fade", 10);
|
AddWaitStep("wait for potential fade", 10);
|
||||||
AddAssert("layer is still visible", () => layer.IsPresent);
|
AddAssert("layer is still visible", () => layer.IsPresent);
|
||||||
@ -90,7 +90,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestLayerVisibilityWithDifferentOptions()
|
public void TestLayerVisibilityWithDifferentOptions()
|
||||||
{
|
{
|
||||||
create(new DrainingHealthProcessor(1));
|
create(new DrainingHealthProcessor(0));
|
||||||
|
|
||||||
AddStep("set health to 0.10", () => layer.Current.Value = 0.1);
|
AddStep("set health to 0.10", () => layer.Current.Value = 0.1);
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
private ScoreProcessor scoreProcessor = new ScoreProcessor();
|
private ScoreProcessor scoreProcessor = new ScoreProcessor();
|
||||||
|
|
||||||
[Cached(typeof(HealthProcessor))]
|
[Cached(typeof(HealthProcessor))]
|
||||||
private HealthProcessor healthProcessor = new DrainingHealthProcessor(1);
|
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);
|
||||||
|
|
||||||
// best way to check without exposing.
|
// best way to check without exposing.
|
||||||
private Drawable hideTarget => hudOverlay.KeyCounter;
|
private Drawable hideTarget => hudOverlay.KeyCounter;
|
||||||
|
Loading…
Reference in New Issue
Block a user