1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 01:32:55 +08:00

Add missing cache rules

This commit is contained in:
Dean Herbert 2021-05-07 17:47:38 +09:00
parent 6c255a0572
commit 3044b1c432
3 changed files with 9 additions and 2 deletions

View File

@ -21,6 +21,9 @@ namespace osu.Game.Tests.Visual.Gameplay
[Cached] [Cached]
private readonly ScoreProcessor scoreProcessor = new ScoreProcessor(); private readonly ScoreProcessor scoreProcessor = new ScoreProcessor();
[Cached(typeof(HealthProcessor))]
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);
[SetUpSteps] [SetUpSteps]
public void SetUpSteps() public void SetUpSteps()
{ {

View File

@ -27,6 +27,9 @@ namespace osu.Game.Tests.Visual.Gameplay
[Cached] [Cached]
private ScoreProcessor scoreProcessor = new ScoreProcessor(); private ScoreProcessor scoreProcessor = new ScoreProcessor();
[Cached(typeof(HealthProcessor))]
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);
private IEnumerable<HUDOverlay> hudOverlays => CreatedDrawables.OfType<HUDOverlay>(); private IEnumerable<HUDOverlay> hudOverlays => CreatedDrawables.OfType<HUDOverlay>();
// best way to check without exposing. // best way to check without exposing.

View File

@ -10,6 +10,7 @@ using osu.Game.Rulesets;
using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Judgements; using osu.Game.Rulesets.Osu.Judgements;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Play.HUD; using osu.Game.Screens.Play.HUD;
@ -21,7 +22,7 @@ namespace osu.Game.Tests.Visual.Gameplay
protected override Ruleset CreateRulesetForSkinProvider() => new OsuRuleset(); protected override Ruleset CreateRulesetForSkinProvider() => new OsuRuleset();
[Cached] [Cached(typeof(HealthProcessor))]
private HealthProcessor healthProcessor = new DrainingHealthProcessor(0); private HealthProcessor healthProcessor = new DrainingHealthProcessor(0);
[SetUpSteps] [SetUpSteps]
@ -53,7 +54,7 @@ namespace osu.Game.Tests.Visual.Gameplay
AddRepeatStep(@"increase hp with flash", delegate AddRepeatStep(@"increase hp with flash", delegate
{ {
healthProcessor.Health.Value = 0.1f; healthProcessor.Health.Value = 0.1f;
healthProcessor.ApplyResult(new JudgementResult(null, new OsuJudgement())); healthProcessor.ApplyResult(new JudgementResult(new HitCircle(), new OsuJudgement()));
}, 3); }, 3);
} }
} }