mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 02:22:56 +08:00
Adjust test scene to apply miss judgements as well
This commit is contained in:
parent
d18bd2d2ac
commit
869f8e5e1b
@ -6,6 +6,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Osu.Judgements;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
@ -28,15 +29,21 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
AddStep(@"Reset all", delegate
|
||||
{
|
||||
healthProcessor.Health.Value = 1;
|
||||
healthProcessor.Failed += () => false; // health won't be updated if the processor gets into a "fail" state.
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestHealthDisplayIncrementing()
|
||||
{
|
||||
AddRepeatStep(@"decrease hp", delegate
|
||||
AddRepeatStep("apply miss judgement", delegate
|
||||
{
|
||||
healthProcessor.Health.Value -= 0.08f;
|
||||
healthProcessor.ApplyResult(new JudgementResult(new HitObject(), new Judgement()) { Type = HitResult.Miss });
|
||||
}, 5);
|
||||
|
||||
AddRepeatStep(@"decrease hp slightly", delegate
|
||||
{
|
||||
healthProcessor.Health.Value -= 0.01f;
|
||||
}, 10);
|
||||
|
||||
AddRepeatStep(@"increase hp without flash", delegate
|
||||
|
Loading…
Reference in New Issue
Block a user