From 5343f6922cbfdae09fb87654e2aa1d198a71c270 Mon Sep 17 00:00:00 2001 From: Joppe27 Date: Tue, 22 Nov 2022 17:22:00 +0100 Subject: [PATCH 1/8] Add legacy circle piece animations based on combo --- .../Skinning/Legacy/LegacyCirclePiece.cs | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs index 6b2576a564..2a260b8cb3 100644 --- a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs +++ b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs @@ -2,13 +2,16 @@ // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; +using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Animations; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Primitives; +using osu.Game.Beatmaps; using osu.Game.Graphics; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Taiko.Objects; +using osu.Game.Screens.Play; using osu.Game.Skinning; using osuTK; using osuTK.Graphics; @@ -18,6 +21,13 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy public class LegacyCirclePiece : CompositeDrawable, IHasAccentColour { private Drawable backgroundLayer = null!; + private Drawable? foregroundLayer; + + private Bindable currentCombo { get; } = new BindableInt(); + + private int animationFrame; + private int multiplier; + private double beatLength; // required for editor blueprints (not sure why these circle pieces are zero size). public override Quad ScreenSpaceDrawQuad => backgroundLayer.ScreenSpaceDrawQuad; @@ -27,6 +37,12 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy RelativeSizeAxes = Axes.Both; } + [Resolved] + private GameplayState? gameplayState { get; set; } + + [Resolved] + private IBeatSyncProvider? beatSyncProvider { get; set; } + [BackgroundDependencyLoader] private void load(ISkinSource skin, DrawableHitObject drawableHitObject) { @@ -45,7 +61,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy // backgroundLayer is guaranteed to exist due to the pre-check in TaikoLegacySkinTransformer. AddInternal(backgroundLayer = new LegacyKiaiFlashingDrawable(() => getDrawableFor("circle"))); - var foregroundLayer = getDrawableFor("circleoverlay"); + foregroundLayer = getDrawableFor("circleoverlay"); if (foregroundLayer != null) AddInternal(foregroundLayer); @@ -58,6 +74,9 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy c.Anchor = Anchor.Centre; c.Origin = Anchor.Centre; } + + if (gameplayState != null) + currentCombo.BindTo(gameplayState.ScoreProcessor.Combo); } protected override void LoadComplete() @@ -74,6 +93,29 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy // This ensures they are scaled relative to each other but also match the expected DrawableHit size. foreach (var c in InternalChildren) c.Scale = new Vector2(DrawHeight / 128); + + if (currentCombo.Value >= 150) + { + multiplier = 2; + } + else if (currentCombo.Value >= 50) + { + multiplier = 1; + } + else + { + (foregroundLayer as IFramedAnimation)?.GotoFrame(0); + return; + } + + if (beatSyncProvider?.ControlPoints != null) + { + beatLength = beatSyncProvider.ControlPoints.TimingPointAt(LifetimeStart).BeatLength; + + animationFrame = Time.Current % ((beatLength * 2) / multiplier) >= beatLength / multiplier ? 0 : 1; + + (foregroundLayer as IFramedAnimation)?.GotoFrame(animationFrame); + } } private Color4 accentColour; From db34fa99b1adc5a1d422da1b93e129fdcda31dbd Mon Sep 17 00:00:00 2001 From: Joppe27 Date: Tue, 22 Nov 2022 17:22:34 +0100 Subject: [PATCH 2/8] Add tests and clean up inefficient code --- .../Skinning/TestSceneDrawableDrumRoll.cs | 25 ++++++++- .../Skinning/TestSceneDrawableDrumRollKiai.cs | 30 ---------- .../Skinning/TestSceneDrawableHit.cs | 55 +++++++++++++++++++ .../Skinning/TestSceneDrawableHitKiai.cs | 30 ---------- 4 files changed, 79 insertions(+), 61 deletions(-) delete mode 100644 osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRollKiai.cs delete mode 100644 osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHitKiai.cs diff --git a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRoll.cs b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRoll.cs index e42dc254ac..7a3439d8eb 100644 --- a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRoll.cs +++ b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRoll.cs @@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning }; [Test] - public void DrumrollTest() + public void TestDrumroll() { AddStep("Drum roll", () => SetContents(_ => { @@ -57,6 +57,14 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning })); } + [Test] + public void TestDrumrollKiai() + { + AddStep("Create beatmap", createBeatmap); + + TestDrumroll(); + } + private DrumRoll createDrumRollAtCurrentTime(bool strong = false) { var drumroll = new DrumRoll @@ -73,5 +81,20 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning return drumroll; } + + private void createBeatmap() + { + var controlPointInfo = new ControlPointInfo(); + + controlPointInfo.Add(0, new TimingControlPoint { BeatLength = 500 }); + controlPointInfo.Add(0, new EffectControlPoint { KiaiMode = true }); + + Beatmap.Value = CreateWorkingBeatmap(new Beatmap + { + ControlPointInfo = controlPointInfo + }); + + Beatmap.Value.Track.Start(); + } } } diff --git a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRollKiai.cs b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRollKiai.cs deleted file mode 100644 index 53977150e7..0000000000 --- a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRollKiai.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using NUnit.Framework; -using osu.Game.Beatmaps.ControlPoints; -using osu.Game.Beatmaps; - -namespace osu.Game.Rulesets.Taiko.Tests.Skinning -{ - [TestFixture] - public class TestSceneDrawableDrumRollKiai : TestSceneDrawableDrumRoll - { - [SetUp] - public void SetUp() => Schedule(() => - { - var controlPointInfo = new ControlPointInfo(); - - controlPointInfo.Add(0, new TimingControlPoint { BeatLength = 500 }); - controlPointInfo.Add(0, new EffectControlPoint { KiaiMode = true }); - - Beatmap.Value = CreateWorkingBeatmap(new Beatmap - { - ControlPointInfo = controlPointInfo - }); - - // track needs to be playing for BeatSyncedContainer to work. - Beatmap.Value.Track.Start(); - }); - } -} diff --git a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs index eb2b6c1d74..3902a3123b 100644 --- a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs +++ b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs @@ -4,17 +4,23 @@ #nullable disable using NUnit.Framework; +using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Beatmaps; using osu.Game.Beatmaps.ControlPoints; using osu.Game.Rulesets.Taiko.Objects; using osu.Game.Rulesets.Taiko.Objects.Drawables; +using osu.Game.Screens.Play; +using osu.Game.Tests.Gameplay; namespace osu.Game.Rulesets.Taiko.Tests.Skinning { [TestFixture] public class TestSceneDrawableHit : TaikoSkinnableTestScene { + [Cached] + private GameplayState gameplayState = TestGameplayState.Create(new TaikoRuleset()); + [Test] public void TestHits() { @@ -43,6 +49,38 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning })); } + [Test] + public void TestHitKiai() + { + AddStep("Create beatmap", () => createBeatmap(true)); + + TestHits(); + } + + [Test] + public void TestHitAnimationSlow() + { + AddStep("Create beatmap", () => createBeatmap(false)); + + AddStep("Reset combo", () => gameplayState.ScoreProcessor.Combo.Value = 0); + + AddRepeatStep("Increase combo", () => gameplayState.ScoreProcessor.Combo.Value++, 50); + + TestHits(); + } + + [Test] + public void TestHitAnimationFast() + { + AddStep("Create beatmap", () => createBeatmap(false)); + + AddStep("Reset combo", () => gameplayState.ScoreProcessor.Combo.Value = 0); + + AddRepeatStep("Increase combo", () => gameplayState.ScoreProcessor.Combo.Value++, 150); + + TestHits(); + } + private Hit createHitAtCurrentTime(bool strong = false, bool rim = false) { var hit = new Hit @@ -56,5 +94,22 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning return hit; } + + private void createBeatmap(bool includeKiai) + { + var controlPointInfo = new ControlPointInfo(); + + controlPointInfo.Add(0, new TimingControlPoint { BeatLength = 500 }); + + if (includeKiai) + controlPointInfo.Add(0, new EffectControlPoint { KiaiMode = true }); + + Beatmap.Value = CreateWorkingBeatmap(new Beatmap + { + ControlPointInfo = controlPointInfo + }); + + Beatmap.Value.Track.Start(); + } } } diff --git a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHitKiai.cs b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHitKiai.cs deleted file mode 100644 index fac0530749..0000000000 --- a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHitKiai.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using NUnit.Framework; -using osu.Game.Beatmaps; -using osu.Game.Beatmaps.ControlPoints; - -namespace osu.Game.Rulesets.Taiko.Tests.Skinning -{ - [TestFixture] - public class TestSceneDrawableHitKiai : TestSceneDrawableHit - { - [SetUp] - public void SetUp() => Schedule(() => - { - var controlPointInfo = new ControlPointInfo(); - - controlPointInfo.Add(0, new TimingControlPoint { BeatLength = 500 }); - controlPointInfo.Add(0, new EffectControlPoint { KiaiMode = true }); - - Beatmap.Value = CreateWorkingBeatmap(new Beatmap - { - ControlPointInfo = controlPointInfo - }); - - // track needs to be playing for BeatSyncedContainer to work. - Beatmap.Value.Track.Start(); - }); - } -} From 5a5b0ed4ef67ded0211486baf887ac251645b931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 22 Nov 2022 20:28:41 +0100 Subject: [PATCH 3/8] Restructure tests not to call each other Bit weird to have tests call other tests. Private helper methods is better, if unavoidable. --- .../Skinning/TestSceneDrawableDrumRoll.cs | 18 ++--- .../Skinning/TestSceneDrawableHit.cs | 68 +++++++++---------- 2 files changed, 40 insertions(+), 46 deletions(-) diff --git a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRoll.cs b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRoll.cs index 7a3439d8eb..25cb3f7886 100644 --- a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRoll.cs +++ b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableDrumRoll.cs @@ -26,8 +26,10 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning }; [Test] - public void TestDrumroll() + public void TestDrumroll([Values] bool withKiai) { + AddStep("set up beatmap", () => setUpBeatmap(withKiai)); + AddStep("Drum roll", () => SetContents(_ => { var hoc = new ScrollingHitObjectContainer(); @@ -57,14 +59,6 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning })); } - [Test] - public void TestDrumrollKiai() - { - AddStep("Create beatmap", createBeatmap); - - TestDrumroll(); - } - private DrumRoll createDrumRollAtCurrentTime(bool strong = false) { var drumroll = new DrumRoll @@ -82,12 +76,14 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning return drumroll; } - private void createBeatmap() + private void setUpBeatmap(bool withKiai) { var controlPointInfo = new ControlPointInfo(); controlPointInfo.Add(0, new TimingControlPoint { BeatLength = 500 }); - controlPointInfo.Add(0, new EffectControlPoint { KiaiMode = true }); + + if (withKiai) + controlPointInfo.Add(0, new EffectControlPoint { KiaiMode = true }); Beatmap.Value = CreateWorkingBeatmap(new Beatmap { diff --git a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs index 3902a3123b..b13255b31c 100644 --- a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs +++ b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs @@ -22,7 +22,37 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning private GameplayState gameplayState = TestGameplayState.Create(new TaikoRuleset()); [Test] - public void TestHits() + public void TestHits([Values] bool withKiai) + { + AddStep("Create beatmap", () => setUpBeatmap(withKiai)); + addHitSteps(); + } + + [Test] + public void TestHitAnimationSlow() + { + AddStep("Create beatmap", () => setUpBeatmap(false)); + + AddStep("Reset combo", () => gameplayState.ScoreProcessor.Combo.Value = 0); + + AddRepeatStep("Increase combo", () => gameplayState.ScoreProcessor.Combo.Value++, 50); + + addHitSteps(); + } + + [Test] + public void TestHitAnimationFast() + { + AddStep("Create beatmap", () => setUpBeatmap(false)); + + AddStep("Reset combo", () => gameplayState.ScoreProcessor.Combo.Value = 0); + + AddRepeatStep("Increase combo", () => gameplayState.ScoreProcessor.Combo.Value++, 150); + + addHitSteps(); + } + + private void addHitSteps() { AddStep("Centre hit", () => SetContents(_ => new DrawableHit(createHitAtCurrentTime()) { @@ -49,38 +79,6 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning })); } - [Test] - public void TestHitKiai() - { - AddStep("Create beatmap", () => createBeatmap(true)); - - TestHits(); - } - - [Test] - public void TestHitAnimationSlow() - { - AddStep("Create beatmap", () => createBeatmap(false)); - - AddStep("Reset combo", () => gameplayState.ScoreProcessor.Combo.Value = 0); - - AddRepeatStep("Increase combo", () => gameplayState.ScoreProcessor.Combo.Value++, 50); - - TestHits(); - } - - [Test] - public void TestHitAnimationFast() - { - AddStep("Create beatmap", () => createBeatmap(false)); - - AddStep("Reset combo", () => gameplayState.ScoreProcessor.Combo.Value = 0); - - AddRepeatStep("Increase combo", () => gameplayState.ScoreProcessor.Combo.Value++, 150); - - TestHits(); - } - private Hit createHitAtCurrentTime(bool strong = false, bool rim = false) { var hit = new Hit @@ -95,13 +93,13 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning return hit; } - private void createBeatmap(bool includeKiai) + private void setUpBeatmap(bool withKiai) { var controlPointInfo = new ControlPointInfo(); controlPointInfo.Add(0, new TimingControlPoint { BeatLength = 500 }); - if (includeKiai) + if (withKiai) controlPointInfo.Add(0, new EffectControlPoint { KiaiMode = true }); Beatmap.Value = CreateWorkingBeatmap(new Beatmap From 8ac0a759f01b92c665d6108fc1271e5f70590475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 22 Nov 2022 20:30:27 +0100 Subject: [PATCH 4/8] Set combo immediately rather than via repeat steps Doesn't help anyone to be waiting literal minutes for combo to hit 50 or 150 in a test scene supposed to quickly visually demonstrate a component. Doesn't help for CI runtime, either. --- .../Skinning/TestSceneDrawableHit.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs index b13255b31c..65a59be89b 100644 --- a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs +++ b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs @@ -33,10 +33,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning { AddStep("Create beatmap", () => setUpBeatmap(false)); - AddStep("Reset combo", () => gameplayState.ScoreProcessor.Combo.Value = 0); - - AddRepeatStep("Increase combo", () => gameplayState.ScoreProcessor.Combo.Value++, 50); - + AddStep("Set 50 combo", () => gameplayState.ScoreProcessor.Combo.Value = 50); addHitSteps(); } @@ -45,10 +42,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning { AddStep("Create beatmap", () => setUpBeatmap(false)); - AddStep("Reset combo", () => gameplayState.ScoreProcessor.Combo.Value = 0); - - AddRepeatStep("Increase combo", () => gameplayState.ScoreProcessor.Combo.Value++, 150); - + AddStep("Set 150 combo", () => gameplayState.ScoreProcessor.Combo.Value = 150); addHitSteps(); } From 38f2a27f537e12d9deef306e327715983afecb33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 22 Nov 2022 20:34:43 +0100 Subject: [PATCH 5/8] Split animation logic to its own method Also add a guard, to bypass all of it if the foreground layer is not in fact animatable. --- .../Skinning/Legacy/LegacyCirclePiece.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs index 2a260b8cb3..c8dc29f444 100644 --- a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs +++ b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs @@ -26,7 +26,6 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy private Bindable currentCombo { get; } = new BindableInt(); private int animationFrame; - private int multiplier; private double beatLength; // required for editor blueprints (not sure why these circle pieces are zero size). @@ -94,6 +93,14 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy foreach (var c in InternalChildren) c.Scale = new Vector2(DrawHeight / 128); + if (foregroundLayer is IFramedAnimation animatableForegroundLayer) + animateForegroundLayer(animatableForegroundLayer); + } + + private void animateForegroundLayer(IFramedAnimation animatableForegroundLayer) + { + int multiplier; + if (currentCombo.Value >= 150) { multiplier = 2; @@ -104,7 +111,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy } else { - (foregroundLayer as IFramedAnimation)?.GotoFrame(0); + animatableForegroundLayer.GotoFrame(0); return; } @@ -114,7 +121,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy animationFrame = Time.Current % ((beatLength * 2) / multiplier) >= beatLength / multiplier ? 0 : 1; - (foregroundLayer as IFramedAnimation)?.GotoFrame(animationFrame); + animatableForegroundLayer.GotoFrame(animationFrame); } } From ce7af0df637b3098c8e5eca1d9d137bc5fe2ed94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 22 Nov 2022 20:39:22 +0100 Subject: [PATCH 6/8] Always use current timing point for circle piece animation Using `LifetimeStart` seemed arbitrary and wrong not only in a compatibility-with-stable sense, but also in a general sanity sense (why would each object potentially be using a different timing point to animate?) --- osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs index c8dc29f444..03d89d269b 100644 --- a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs +++ b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs @@ -117,7 +117,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy if (beatSyncProvider?.ControlPoints != null) { - beatLength = beatSyncProvider.ControlPoints.TimingPointAt(LifetimeStart).BeatLength; + beatLength = beatSyncProvider.ControlPoints.TimingPointAt(Time.Current).BeatLength; animationFrame = Time.Current % ((beatLength * 2) / multiplier) >= beatLength / multiplier ? 0 : 1; From 675e32df5761cd81c7365aa7aaac7116bcd6da9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 22 Nov 2022 20:43:22 +0100 Subject: [PATCH 7/8] Add test steps for testing combo reset to 0 --- osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs index 65a59be89b..adfd27c5d6 100644 --- a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs +++ b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneDrawableHit.cs @@ -35,6 +35,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning AddStep("Set 50 combo", () => gameplayState.ScoreProcessor.Combo.Value = 50); addHitSteps(); + AddStep("Reset combo", () => gameplayState.ScoreProcessor.Combo.Value = 0); } [Test] @@ -44,6 +45,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning AddStep("Set 150 combo", () => gameplayState.ScoreProcessor.Combo.Value = 150); addHitSteps(); + AddStep("Reset combo", () => gameplayState.ScoreProcessor.Combo.Value = 0); } private void addHitSteps() From 6e9d163c7240eba2964e4043229fa5f7bdcacf0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 22 Nov 2022 20:56:07 +0100 Subject: [PATCH 8/8] Specify `canBeNull: true` in `[Resolved]` for now --- osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs index 03d89d269b..a5867ff51c 100644 --- a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs +++ b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyCirclePiece.cs @@ -36,10 +36,10 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy RelativeSizeAxes = Axes.Both; } - [Resolved] + [Resolved(canBeNull: true)] private GameplayState? gameplayState { get; set; } - [Resolved] + [Resolved(canBeNull: true)] private IBeatSyncProvider? beatSyncProvider { get; set; } [BackgroundDependencyLoader]