1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-18 23:57:22 +08:00

Fix some regressions when updating test scenes

This commit is contained in:
Dean Herbert 2021-05-10 12:06:33 +09:00
parent b274fdf20d
commit 132bb7832d
2 changed files with 9 additions and 9 deletions

View File

@ -4,6 +4,7 @@
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Testing;
using osu.Game.Configuration;
@ -21,17 +22,13 @@ namespace osu.Game.Tests.Visual.Gameplay
[Resolved]
private OsuConfigManager config { get; set; }
[SetUpSteps]
public void SetUpSteps()
{
}
private void create(HealthProcessor healthProcessor)
{
AddStep("create layer", () =>
{
Child = new HealthProcessorContainer(healthProcessor)
{
RelativeSizeAxes = Axes.Both,
Child = layer = new FailingLayer()
};

View File

@ -43,18 +43,21 @@ namespace osu.Game.Tests.Visual.Gameplay
{
AddRepeatStep(@"decrease hp", delegate
{
healthProcessor.Health.Value = 0.08f;
healthProcessor.Health.Value -= 0.08f;
}, 10);
AddRepeatStep(@"increase hp without flash", delegate
{
healthProcessor.Health.Value = 0.1f;
healthProcessor.Health.Value += 0.1f;
}, 3);
AddRepeatStep(@"increase hp with flash", delegate
{
healthProcessor.Health.Value = 0.1f;
healthProcessor.ApplyResult(new JudgementResult(new HitCircle(), new OsuJudgement()));
healthProcessor.Health.Value += 0.1f;
healthProcessor.ApplyResult(new JudgementResult(new HitCircle(), new OsuJudgement())
{
Type = HitResult.Perfect
});
}, 3);
}
}